item list

This commit is contained in:
ntr
2018-10-14 23:10:39 +11:00
parent f5cd913adf
commit b83ab923c4
10 changed files with 346 additions and 90 deletions
@@ -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
View File
@@ -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"