Skip to content

Commit

Permalink
Fix DB model in importer-db-api according to changes made to importer…
Browse files Browse the repository at this point in the history
…-mankeli's model when upgrading sequelize
  • Loading branch information
AleksTeresh committed Jun 17, 2024
1 parent eae72ea commit 5bbba16
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
8 changes: 3 additions & 5 deletions importer-db-api/src/models/AssessmentItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ AssessmentItem.init(
autoIncrement: true
},
id: {
type: STRING,
unique: true
type: STRING
},
modificationOrdinal: {
type: BIGINT,
unique: true
type: BIGINT
},
documentState: {
type: STRING
Expand Down Expand Up @@ -80,7 +78,7 @@ AssessmentItem.init(
indexes: [
{
unique: true,
fields: ['id', 'modificationOrdinal']
fields: ['id', 'modification_ordinal']
},
{
fields: ['id']
Expand Down
2 changes: 1 addition & 1 deletion importer-db-api/src/models/Disclosure.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Disclosure.init(
fields: ['id']
},
{
fields: ['disclosureCategoryId']
fields: ['disclosure_category_id']
}
]
}
Expand Down
8 changes: 3 additions & 5 deletions importer-db-api/src/models/Organisation.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ Organisation.init(
autoIncrement: true
},
id: {
type: STRING,
unique: true
type: STRING
},
modificationOrdinal: {
type: BIGINT,
unique: true
type: BIGINT
},
documentState: {
type: STRING
Expand Down Expand Up @@ -114,7 +112,7 @@ Organisation.init(
indexes: [
{
unique: true,
fields: ['id', 'modificationOrdinal']
fields: ['id', 'modification_ordinal']
},
{
fields: ['id']
Expand Down
8 changes: 3 additions & 5 deletions importer-db-api/src/models/StudyRight.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ StudyRight.init(
autoIncrement: true
},
id: {
type: STRING,
unique: true
type: STRING
},
personId: {
type: STRING
Expand All @@ -27,8 +26,7 @@ StudyRight.init(
type: STRING
},
modificationOrdinal: {
type: BIGINT,
unique: true
type: BIGINT
},
documentState: {
type: STRING
Expand Down Expand Up @@ -96,7 +94,7 @@ StudyRight.init(
indexes: [
{
unique: true,
fields: ['id', 'modificationOrdinal']
fields: ['id', 'modification_ordinal']
},
{
fields: ['id']
Expand Down

0 comments on commit 5bbba16

Please sign in to comment.