Skip to content
Snippets Groups Projects
Commit 29d504ad authored by Paolo Brasolin's avatar Paolo Brasolin
Browse files

refactor: #be drop legacy migrations

parent 8eddf178
No related branches found
No related tags found
No related merge requests found
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = function (knex) {
return knex.schema
.createTable("images", function (table) {
table.increments("id").primary();
table.string("filename", 200);
table.string("md5", 255);
table.binary("image");
})
.createTable("game_results", function (table) {
table.increments("id").primary();
table.string("transcription", 255);
table.integer("gametime", 11).notNullable();
table.integer("id_image", 11).notNullable();
table.foreign("id_image").references("id").inTable("images");
});
};
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema.dropTable("game_results").dropTable("images");
};
import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
return knex.schema.dropTable("game_results").dropTable("images");
}
export async function down(knex: Knex): Promise<void> {
// NOTE: we're not interested in reversing this.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment