Skip to content

Commit 27ae1f8

Browse files
authored
Update nominal voltage columns types to ENUM (#53)
Signed-off-by: Ayoub LABIDI <[email protected]>
1 parent a694a1b commit 27ae1f8

File tree

3 files changed

+44
-30
lines changed

3 files changed

+44
-30
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
3+
<changeSet id="update-nominalVoltage-type-enum-precision-null" author="labidiayo">
4+
<sql dbms="postgresql">
5+
UPDATE spreadsheet_column
6+
SET type = 'ENUM',
7+
precision = NULL
8+
WHERE column_id IN ('nominalV', 'nominalVoltage', 'nominalVoltage1', 'nominalVoltage2', 'nominalV1', 'nominalV2', 'nominalV3')
9+
</sql>
10+
</changeSet>
11+
</databaseChangeLog>

src/main/resources/db/changelog/db.changelog-master.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ databaseChangeLog:
4141
- include:
4242
file: changesets/changelog_20250513T135500Z.xml
4343
relativeToChangelogFile: true
44+
- include:
45+
file: changesets/changelog_20250522T225500Z.xml
46+
relativeToChangelogFile: true

src/main/resources/default-spreadsheet-config-collection.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
},
6969
{
7070
"name": "Nominal V",
71-
"type": "NUMBER",
72-
"precision": 0,
71+
"type": "ENUM",
72+
"precision": null,
7373
"formula": "nominalV",
7474
"dependencies": null,
7575
"id": "nominalV"
@@ -162,16 +162,16 @@
162162
},
163163
{
164164
"name": "Nominal voltage 1 (kV)",
165-
"type": "NUMBER",
166-
"precision": 0,
165+
"type": "ENUM",
166+
"precision": null,
167167
"formula": "nominalVoltage1",
168168
"dependencies": null,
169169
"id": "nominalVoltage1"
170170
},
171171
{
172172
"name": "Nominal voltage 2 (kV)",
173-
"type": "NUMBER",
174-
"precision": 0,
173+
"type": "ENUM",
174+
"precision": null,
175175
"formula": "nominalVoltage2",
176176
"dependencies": null,
177177
"id": "nominalVoltage2"
@@ -320,16 +320,16 @@
320320
},
321321
{
322322
"name": "Nominal voltage 1 (kV)",
323-
"type": "NUMBER",
324-
"precision": 0,
323+
"type": "ENUM",
324+
"precision": null,
325325
"formula": "nominalVoltage1",
326326
"dependencies": null,
327327
"id": "nominalVoltage1"
328328
},
329329
{
330330
"name": "Nominal voltage 2 (kV)",
331-
"type": "NUMBER",
332-
"precision": 0,
331+
"type": "ENUM",
332+
"precision": null,
333333
"formula": "nominalVoltage2",
334334
"dependencies": null,
335335
"id": "nominalVoltage2"
@@ -646,24 +646,24 @@
646646
},
647647
{
648648
"name": "Nominal voltage 1 (kV)",
649-
"type": "NUMBER",
650-
"precision": 0,
649+
"type": "ENUM",
650+
"precision": null,
651651
"formula": "nominalV1",
652652
"dependencies": null,
653653
"id": "nominalV1"
654654
},
655655
{
656656
"name": "Nominal voltage 2 (kV)",
657-
"type": "NUMBER",
658-
"precision": 0,
657+
"type": "ENUM",
658+
"precision": null,
659659
"formula": "nominalV2",
660660
"dependencies": null,
661661
"id": "nominalV2"
662662
},
663663
{
664664
"name": "Nominal voltage 3 (kV)",
665-
"type": "NUMBER",
666-
"precision": 0,
665+
"type": "ENUM",
666+
"precision": null,
667667
"formula": "nominalV3",
668668
"dependencies": null,
669669
"id": "nominalV3"
@@ -980,8 +980,8 @@
980980
},
981981
{
982982
"name": "Nominal V",
983-
"type": "NUMBER",
984-
"precision": 0,
983+
"type": "ENUM",
984+
"precision": null,
985985
"formula": "nominalVoltage",
986986
"dependencies": null,
987987
"id": "nominalVoltage"
@@ -1194,8 +1194,8 @@
11941194
},
11951195
{
11961196
"name": "Nominal V",
1197-
"type": "NUMBER",
1198-
"precision": 0,
1197+
"type": "ENUM",
1198+
"precision": null,
11991199
"formula": "nominalVoltage",
12001200
"dependencies": null,
12011201
"id": "nominalVoltage"
@@ -1288,8 +1288,8 @@
12881288
},
12891289
{
12901290
"name": "Nominal V",
1291-
"type": "NUMBER",
1292-
"precision": 0,
1291+
"type": "ENUM",
1292+
"precision": null,
12931293
"formula": "nominalVoltage",
12941294
"dependencies": null,
12951295
"id": "nominalVoltage"
@@ -1406,8 +1406,8 @@
14061406
},
14071407
{
14081408
"name": "Nominal V",
1409-
"type": "NUMBER",
1410-
"precision": 0,
1409+
"type": "ENUM",
1410+
"precision": null,
14111411
"formula": "nominalV",
14121412
"dependencies": null,
14131413
"id": "nominalV"
@@ -1492,8 +1492,8 @@
14921492
},
14931493
{
14941494
"name": "Nominal V",
1495-
"type": "NUMBER",
1496-
"precision": 0,
1495+
"type": "ENUM",
1496+
"precision": null,
14971497
"formula": "nominalVoltage",
14981498
"dependencies": null,
14991499
"id": "nominalVoltage"
@@ -1752,8 +1752,8 @@
17521752
},
17531753
{
17541754
"name": "Nominal V",
1755-
"type": "NUMBER",
1756-
"precision": 0,
1755+
"type": "ENUM",
1756+
"precision": null,
17571757
"formula": "nominalV",
17581758
"dependencies": null,
17591759
"id": "nominalV"
@@ -1846,8 +1846,8 @@
18461846
},
18471847
{
18481848
"name": "Nominal V",
1849-
"type": "NUMBER",
1850-
"precision": 0,
1849+
"type": "ENUM",
1850+
"precision": null,
18511851
"formula": "nominalV",
18521852
"dependencies": null,
18531853
"id": "nominalV"

0 commit comments

Comments
 (0)