Skip to content

Commit 9784940

Browse files
committed
chore: undo changes
1 parent f3d1dcb commit 9784940

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
const { Knex } = require('knex');
2-
3-
/** @param {Knex} knex */
41
exports.up = (knex) => {
5-
knex.schema.hasTable('posts')
6-
.then((exists) => {
7-
if (!exists) {
8-
return knex.schema.createTable('posts', (table) => {
9-
table.increments('id').primary();
10-
table.string('body');
11-
table.timestamps(true, true);
12-
});
13-
}
14-
})
15-
.catch((error) => {
16-
console.error('Error checking for posts table:', error);
17-
});
2+
return knex.schema.createTable('posts', (table) => {
3+
table.increments('id').primary();
4+
table.string('body');
5+
table.timestamps(true, true);
6+
});
187
};
198

209
exports.down = (knex) => knex.schema.dropTable('posts');

0 commit comments

Comments
 (0)