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.

17 lines
488 B

  1. exports.up = knex => {
  2. return knex.schema
  3. .createTable('pageLinks', table => {
  4. table.increments('id').primary()
  5. table.integer('pageId').unsigned().references('id').inTable('pages').onDelete('CASCADE')
  6. table.string('path').notNullable()
  7. table.string('localeCode', 5).notNullable()
  8. })
  9. .table('pageLinks', table => {
  10. table.index(['path', 'localeCode'])
  11. })
  12. }
  13. exports.down = knex => {
  14. return knex.schema
  15. .dropTableIfExists('pageLinks')
  16. }