This commit is contained in:
Morten Olsen
2024-12-10 20:59:29 +01:00
commit ede2d56b7c
54 changed files with 6955 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { DatabaseMigration } from '../../databases/databases.js';
const migrations: DatabaseMigration[] = [
{
name: 'init',
up: async (knex) => {
await knex.schema.createTable('files', (table) => {
table.string('id').primary();
table.string('location').notNullable();
table.string('hash').notNullable();
table.dateTime('updatedAt').notNullable();
table.dateTime('syncedAt').nullable();
table.unique('location');
table.index('updatedAt');
table.index('hash');
});
},
down: async (knex) => {
await knex.schema.dropTable('files');
},
},
];
export { migrations };