Use snake_case naming (is_pinned) for database column

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-09 11:38:21 +00:00
parent 056d936df3
commit 67fb4e05a7
2 changed files with 2 additions and 2 deletions

View File

@ -44,5 +44,5 @@ export const EnvModel = sequelize.define<EnvInstance>('Env', {
position: DataTypes.NUMBER, position: DataTypes.NUMBER,
name: { type: DataTypes.STRING, unique: 'compositeIndex' }, name: { type: DataTypes.STRING, unique: 'compositeIndex' },
remarks: DataTypes.STRING, remarks: DataTypes.STRING,
isPinned: DataTypes.NUMBER, isPinned: { type: DataTypes.NUMBER, field: 'is_pinned' },
}); });

View File

@ -57,7 +57,7 @@ export default async () => {
await sequelize.query('alter table Crontabs add column task_after TEXT'); await sequelize.query('alter table Crontabs add column task_after TEXT');
} catch (error) {} } catch (error) {}
try { try {
await sequelize.query('alter table Envs add column isPinned NUMBER'); await sequelize.query('alter table Envs add column is_pinned NUMBER');
} catch (error) {} } catch (error) {}
Logger.info('✌️ DB loaded'); Logger.info('✌️ DB loaded');