diff options
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/20131110050923-add-users.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/migrations/20131110050923-add-users.js b/migrations/20131110050923-add-users.js new file mode 100644 index 00000000..47911db8 --- /dev/null +++ b/migrations/20131110050923-add-users.js @@ -0,0 +1,26 @@ +var dbm = require('db-migrate'); +var type = dbm.dataType; + +exports.up = function(db, callback) { + db.createTable('users', { + id: { type: 'int', primaryKey: true }, + username: { type: 'string' }, + password: { type: 'string' }, + first_name: { type: 'string' }, + last_name: { type: 'string' }, + email: { type: 'string' }, + phone: { type: 'string' }, + company: { type: 'string' }, + category: { type: 'string' }, + website: { type: 'string' }, + location: { type: 'string' }, + city: { type: 'string' }, + postal_code: { type: 'string' }, + province: { type: 'string' }, + country: { type: 'string' } + }, callback); +}; + +exports.down = function(db, callback) { + db.dropTable('users', callback); +}; |
