Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aurimasniekis/dbmigration


https://github.com/aurimasniekis/dbmigration

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

DBMigration
===========

XML Version of migration file
--
```xml






```

Javascript Version of migration file
--
```javascript
migration("201309200947_add_column_title", function(m){
m.up = function(db) {
db.addColumn("users", "title", "string", "Pavadinimas", false);
}

m.down = function(db) {
db.removeColumn("users", "title");
}
});
```

JSON Version of migration file
--
```json
{
"name": "201309200947_add_column_title",
"up": {
"add_column": {
"table": "users",
"name": "title",
"type": "string",
"default": "Pavadinimas",
"null": false
}
},
"down": {
"remove_column": {
"table": "users",
"name": "title"
}
}
}
```