Added basic migration

This commit is contained in:
Nicolai Ort 2021-08-12 20:14:07 +02:00
parent 41e102857e
commit 0a8a5c1fba
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 20 additions and 0 deletions

View File

@ -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) {
};