Refactor multiple models to remove foreign key references while maintaining required fields, enhancing data integrity and simplifying model definitions.
This commit is contained in:
@@ -8,13 +8,6 @@ FalukantUser.init({
|
||||
userId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
references: {
|
||||
model: {
|
||||
tableName: 'user',
|
||||
schema: 'community'
|
||||
},
|
||||
key: 'id'
|
||||
},
|
||||
unique: true},
|
||||
money: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
@@ -38,12 +31,7 @@ FalukantUser.init({
|
||||
defaultValue: 1},
|
||||
mainBranchRegionId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
references: {
|
||||
model: RegionData,
|
||||
key: 'id',
|
||||
schema: 'falukant_data'
|
||||
}
|
||||
allowNull: true
|
||||
},
|
||||
lastNobilityAdvanceAt: {
|
||||
type: DataTypes.DATE,
|
||||
|
||||
Reference in New Issue
Block a user