mirror of
https://github.com/whyour/qinglong.git
synced 2025-12-21 13:25:41 +08:00
Use snake_case naming (is_pinned) for database column
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
056d936df3
commit
67fb4e05a7
|
|
@ -44,5 +44,5 @@ export const EnvModel = sequelize.define<EnvInstance>('Env', {
|
|||
position: DataTypes.NUMBER,
|
||||
name: { type: DataTypes.STRING, unique: 'compositeIndex' },
|
||||
remarks: DataTypes.STRING,
|
||||
isPinned: DataTypes.NUMBER,
|
||||
isPinned: { type: DataTypes.NUMBER, field: 'is_pinned' },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default async () => {
|
|||
await sequelize.query('alter table Crontabs add column task_after TEXT');
|
||||
} catch (error) {}
|
||||
try {
|
||||
await sequelize.query('alter table Envs add column isPinned NUMBER');
|
||||
await sequelize.query('alter table Envs add column is_pinned NUMBER');
|
||||
} catch (error) {}
|
||||
|
||||
Logger.info('✌️ DB loaded');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user