item list
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
exports.up = async knex => {
|
||||
return knex.schema.createTable('items', table => {
|
||||
table.uuid('id').primary();
|
||||
table.uuid('account').notNullable()
|
||||
table.foreign('account')
|
||||
.references('id')
|
||||
.inTable('accounts')
|
||||
.onDelete('CASCADE');
|
||||
table.binary('data').notNullable();
|
||||
table.index('id');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async () => {};
|
||||
+2
-1
@@ -5,10 +5,11 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"migrate": "knex migrate:latest",
|
||||
"migrate:make": "knex migrate:make --",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"knex": "^0.15.2",
|
||||
"pg": "^7.4.3"
|
||||
|
||||
Reference in New Issue
Block a user