Added basic migration
This commit is contained in:
parent
41e102857e
commit
0a8a5c1fba
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
exports.up = function(knex) {
|
||||||
|
return knex.schema.createTable('users', function (table) {
|
||||||
|
table.increments('id');
|
||||||
|
table.string('name');
|
||||||
|
table.string('email').unique();
|
||||||
|
table.string('password');
|
||||||
|
table.timestamps();
|
||||||
|
})
|
||||||
|
.createTable('urls', function(table){
|
||||||
|
table.increments('id');
|
||||||
|
table.string('shortcode', 12);
|
||||||
|
table.string('target');
|
||||||
|
table.timestamps();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = function(knex) {
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue