feat: tags on page fetch + pageLinks table schema

This commit is contained in:
Nick
2019-09-02 18:32:33 -04:00
parent efab00fa0c
commit ab463fcae1
5 changed files with 102 additions and 40 deletions

View File

@@ -0,0 +1,13 @@
exports.up = knex => {
return knex.schema
.createTable('pageLinks', table => {
table.increments('id').primary()
table.integer('sourcePageId').unsigned().references('id').inTable('pages').onDelete('CASCADE')
table.integer('targetPageId').unsigned().references('id').inTable('pages').onDelete('CASCADE')
})
}
exports.down = knex => {
return knex.schema
.dropTableIfExists('pageLinks')
}