mirror of https://github.com/Chocobozzz/PeerTube
Fix migration 200
parent
d788291d2a
commit
79d28db3f9
|
@ -9,7 +9,7 @@ async function up (utils: {
|
|||
{
|
||||
const data = {
|
||||
type: Sequelize.DATE,
|
||||
allowNull: false,
|
||||
allowNull: true,
|
||||
defaultValue: Sequelize.NOW
|
||||
}
|
||||
await utils.queryInterface.addColumn('video', 'publishedAt', data)
|
||||
|
@ -20,6 +20,16 @@ async function up (utils: {
|
|||
await utils.sequelize.query(query)
|
||||
}
|
||||
|
||||
// Sequelize does not alter the column with NOW as default value
|
||||
{
|
||||
const data = {
|
||||
type: Sequelize.DATE,
|
||||
allowNull: false,
|
||||
defaultValue: Sequelize.NOW
|
||||
}
|
||||
await utils.queryInterface.changeColumn('video', 'publishedAt', data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function down (options) {
|
||||
|
|
Loading…
Reference in New Issue