Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2017 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/dc663b836d3f9f178d16949e5c0b03e9 to your computer and use it in GitHub Desktop.
Save anonymous/dc663b836d3f9f178d16949e5c0b03e9 to your computer and use it in GitHub Desktop.
exports.up = function(knex, Promise) {
knex.schema.createTable('images', (table) =>{
table.increments();
table.text('image_title').notNullable();
table.text('image_description');
table.text('image_path').notNullable();
table.boolean('image_is_deleted').defaultTo(false);
table.datetime('image_created_at').notNullable();
});
};
exports.down = function(knex, Promise) {
return knex.schema.dropTable('images');
};
cbravophoto=# \dt
List of relations
Schema | Name | Type | Owner
--------+----------------------+-------+----------
public | knex_migrations | table | AmazeCPK
public | knex_migrations_lock | table | AmazeCPK
(2 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment