fix build

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-04 10:56:29 +01:00
parent 2441d1cf59
commit 1dd5a02e91
14 changed files with 103 additions and 126 deletions
@@ -28,7 +28,7 @@ exports.up = async function up(knex) {
.notNullable()
.defaultTo(knex.fn.now())
.comment('The creation time of the key')
.alter();
.alter({ alterType: true });
});
}
};
@@ -45,7 +45,7 @@ exports.down = async function down(knex) {
.notNullable()
.defaultTo(knex.fn.now())
.comment('The creation time of the key')
.alter();
.alter({ alterType: true });
});
}
};
@@ -23,7 +23,7 @@ exports.up = async function up(knex) {
// Sqlite does not support alter column.
if (knex.client.config.client !== 'sqlite3') {
await knex.schema.alterTable('entities_search', table => {
table.text('value').nullable().alter();
table.text('value').nullable().alter({ alterType: true });
});
}
};
@@ -35,7 +35,7 @@ exports.down = async function down(knex) {
// Sqlite does not support alter column.
if (knex.client.config.client !== 'sqlite3') {
await knex.schema.alterTable('entities_search', table => {
table.string('value').nullable().alter();
table.string('value').nullable().alter({ alterType: true });
});
}
};
@@ -33,7 +33,7 @@ exports.up = async function up(knex) {
// SQLite does not support alter column
if (knex.client.config.client !== 'sqlite3') {
await knex.schema.alterTable('entities', table => {
table.text('full_name').notNullable().alter();
table.text('full_name').notNullable().alter({ alterNullable: true });
});
}
@@ -43,7 +43,7 @@ exports.up = async function up(knex) {
// SQLite does not support ALTER COLUMN.
if (knex.client.config.client !== 'sqlite3') {
await knex.schema.alterTable('entities', table => {
table.text('data').notNullable().alter();
table.text('data').notNullable().alter({ alterNullable: true });
});
}
};
@@ -26,8 +26,8 @@ exports.up = async function up(knex) {
await knex.schema
.raw('DROP VIEW location_update_log_latest;')
.alterTable('location_update_log', table => {
table.text('message').alter();
table.text('entity_name').nullable().alter();
table.text('message').alter({ alterType: true });
table.text('entity_name').nullable().alter({ alterType: true });
}).raw(`
CREATE VIEW location_update_log_latest AS
SELECT t1.* FROM location_update_log t1
@@ -53,8 +53,8 @@ exports.down = async function down(knex) {
await knex.schema
.raw('DROP VIEW location_update_log_latest;')
.alterTable('location_update_log', table => {
table.string('message').alter();
table.string('entity_name').nullable().alter();
table.string('message').alter({ alterType: true });
table.string('entity_name').nullable().alter({ alterType: true });
}).raw(`
CREATE VIEW location_update_log_latest AS
SELECT t1.* FROM location_update_log t1
+1 -1
View File
@@ -75,9 +75,9 @@
"@types/supertest": "^2.0.8",
"@types/uuid": "^8.0.0",
"@types/yup": "^0.29.13",
"@vscode/sqlite3": "^5.0.7",
"aws-sdk-mock": "^5.2.1",
"msw": "^0.35.0",
"sqlite3": "^5.0.1",
"supertest": "^6.1.3",
"wait-for-expect": "^3.0.2",
"luxon": "^2.0.2"