diff --git a/packages/server/src/database/migrations/20231108170207_create_storage_table.js b/packages/server/src/database/migrations/20231108170207_create_storage_table.js new file mode 100644 index 0000000000..0bf9e8ef94 --- /dev/null +++ b/packages/server/src/database/migrations/20231108170207_create_storage_table.js @@ -0,0 +1,14 @@ +exports.up = function (knex) { + return knex.schema.createTable('storage', (table) => { + table.increments('id').primary(); + table.string('key').notNullable(); + table.string('path').notNullable(); + table.string('extension').notNullable(); + table.integer('expire_in'); + table.timestamps(); + }); +}; + +exports.down = function (knex) { + return knex.schema.dropTableIfExists('storage'); +}; \ No newline at end of file diff --git a/packages/server/src/database/migrations/20240604153938_drop_storage_table.js b/packages/server/src/database/migrations/20240604153938_drop_storage_table.js new file mode 100644 index 0000000000..f84c6abd0d --- /dev/null +++ b/packages/server/src/database/migrations/20240604153938_drop_storage_table.js @@ -0,0 +1,5 @@ +exports.up = function (knex) { + return knex.schema.dropTableIfExists('storage'); +}; + +exports.down = function (knex) {}; diff --git a/packages/server/src/database/migrations/20231108170207_create_documents_table.js b/packages/server/src/database/migrations/20240604153951_create_documents_table.js similarity index 100% rename from packages/server/src/database/migrations/20231108170207_create_documents_table.js rename to packages/server/src/database/migrations/20240604153951_create_documents_table.js diff --git a/packages/server/src/database/migrations/20231108170207_create_documents_links.ts b/packages/server/src/database/migrations/20240604154005_create_documents_links_table.js similarity index 100% rename from packages/server/src/database/migrations/20231108170207_create_documents_links.ts rename to packages/server/src/database/migrations/20240604154005_create_documents_links_table.js