diff --git a/ops/migrations/20180913000513_create_accounts.js b/ops/migrations/20180913000513_create_accounts.js index 1b99dd42..35683160 100755 --- a/ops/migrations/20180913000513_create_accounts.js +++ b/ops/migrations/20180913000513_create_accounts.js @@ -1,7 +1,7 @@ exports.up = async knex => { return knex.schema.createTable('accounts', table => { table.uuid('id').primary(); - table.timestamps(); + table.timestamps(true, true); table.string('name', 42).notNullable().unique(); table.string('password').notNullable(); table.string('token', 64).notNullable(); diff --git a/ops/migrations/20181020104420_games.js b/ops/migrations/20181020104420_games.js index ed19db27..a7b225e0 100644 --- a/ops/migrations/20181020104420_games.js +++ b/ops/migrations/20181020104420_games.js @@ -4,14 +4,14 @@ exports.up = async knex => { await knex.schema.createTable('games', table => { table.uuid('id').primary(); table.index('id'); - table.timestamps(); + table.timestamps(true, true); table.binary('data').notNullable(); }); await knex.schema.createTable('instances', async table => { table.uuid('id').primary(); table.index('id'); - table.timestamps(); + table.timestamps(true, true); table.binary('data').notNullable(); table.boolean('open') diff --git a/ops/migrations/20181228162012_zones.js b/ops/migrations/20181228162012_zones.js index 9b66e980..fc8ce077 100644 --- a/ops/migrations/20181228162012_zones.js +++ b/ops/migrations/20181228162012_zones.js @@ -2,7 +2,7 @@ exports.up = async knex => { await knex.schema.createTable('zones', async (table) => { table.uuid('id').primary(); table.index('id'); - table.timestamps(); + table.timestamps(true, true); table.binary('data').notNullable(); diff --git a/server/src/instance.rs b/server/src/instance.rs index 1c67786a..febbd87f 100644 --- a/server/src/instance.rs +++ b/server/src/instance.rs @@ -65,7 +65,7 @@ pub fn instance_write(instance: Instance, tx: &mut Transaction) -> Result Result Result { let query = " SELECT * - FROM instance + FROM instances WHERE open = true; ";