sequelize-typescript
sequelize-typescript copied to clipboard
when i sync table cant create index when i rename field name
Issue
Versions
- sequelize:
- sequelize-typescript:
- typescript:
Issue type
- [x] bug report
- [ ] feature request
Actual behavior
Expected behavior
Steps to reproduce
Related code

insert short code snippets here
Has someone found any solution for this? As far I see db sync must be disabled to workaround this and everything should be done in migration scripts.
2 years, no progress on this issue...
The workaround is to avoid using @Index decorator.
So there are 3 ways to add index:
- manually
- through migration
- describe indexies in
@Tabledecorator options.
@Table({
underscored: true,
timestamps: true,
tableName: 'wrf_sequelize',
indexes: [
{ fields: ['your_awesome_underscored_field_name']}
]
})