shop bois

This commit is contained in:
ntr
2019-07-13 18:27:38 +10:00
parent 52b1e14541
commit 2fa7310aaa
16 changed files with 210 additions and 121 deletions
@@ -9,7 +9,7 @@ exports.up = async knex => {
table.string('token', 64).notNullable();
table.timestamp('token_expiry').notNullable();
table.bigInteger('credits')
table.bigInteger('balance')
.defaultTo(0)
.notNullable();
@@ -23,7 +23,7 @@ exports.up = async knex => {
await knex.schema.raw(`
ALTER TABLE accounts
ADD CHECK (credits > 0);
ADD CHECK (balance > 0);
`);
};