From d0bc63a0deb4a7b9151fdf8bbe7e127d549334c1 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 22 Feb 2019 16:34:57 +1100 Subject: [PATCH] fix typo with isntance and timestamps --- ops/migrations/20180913000513_create_accounts.js | 2 +- ops/migrations/20181020104420_games.js | 4 ++-- ops/migrations/20181228162012_zones.js | 2 +- server/src/instance.rs | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) 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; ";