feat: page links table
This commit is contained in:
@@ -18,7 +18,7 @@ exports.up = knex => {
|
||||
|
||||
table.integer('pageId').unsigned()
|
||||
table.string('editorKey').references('key').inTable('editors')
|
||||
table.string('localeCode', 2).references('code').inTable('locales')
|
||||
table.string('localeCode', 5).references('code').inTable('locales')
|
||||
table.integer('authorId').unsigned().references('id').inTable('users')
|
||||
})
|
||||
.raw(`INSERT INTO pageHistory SELECT id,path,hash,title,description,isPrivate,isPublished,publishStartDate,publishEndDate,content,contentType,createdAt,'updated' AS action,pageId,editorKey,localeCode,authorId FROM pageHistory_old;`)
|
||||
@@ -44,7 +44,7 @@ exports.down = knex => {
|
||||
|
||||
table.integer('pageId').unsigned().references('id').inTable('pages')
|
||||
table.string('editorKey').references('key').inTable('editors')
|
||||
table.string('localeCode', 2).references('code').inTable('locales')
|
||||
table.string('localeCode', 5).references('code').inTable('locales')
|
||||
table.integer('authorId').unsigned().references('id').inTable('users')
|
||||
})
|
||||
.raw('INSERT INTO pageHistory SELECT id,path,hash,title,description,isPrivate,isPublished,publishStartDate,publishEndDate,content,contentType,createdAt,NULL as pageId,editorKey,localeCode,authorId FROM pageHistory_old;')
|
||||
|
Reference in New Issue
Block a user