This is the code that runs https://bandolier.learnjsthehardway.com/ for you to review. It uses the https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template to create the documentation for the project.
https://bandolier.learnjsthehardway.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
exports.up = async (knex) => {
|
|
return knex.schema.alterTable('media', (table) => {
|
|
table.string("title");
|
|
table.string("tags").notNullable().default("");
|
|
table.integer("views").default(0);
|
|
table.string("description");
|
|
table.string("codec_name", 20);
|
|
table.integer("width").notNullable().default(0);
|
|
table.integer("height").notNullable().default(0);
|
|
table.float("duration").notNullable().default(0.0);
|
|
table.enum("state", ["new", "edited", "published"]).defaultTo("new");
|
|
table.string("aspect_ratio", 10).notNullable().default("16/9");
|
|
table.unique("src");
|
|
});
|
|
}
|
|
|
|
exports.down = async (knex) => {
|
|
return knex.schema.alterTable('media', (table) => {
|
|
table.dropColumn("title");
|
|
table.dropColumn("tags");
|
|
table.dropColumn("views");
|
|
table.dropColumn("description");
|
|
table.dropColumn("codec_name");
|
|
table.dropColumn("width");
|
|
table.dropColumn("height");
|
|
table.dropColumn("duration");
|
|
table.dropColumn("state");
|
|
table.dropColumn("aspect_ratio");
|
|
table.dropUnique("src");
|
|
});
|
|
}
|
|
|