summaryrefslogtreecommitdiffhomepage
path: root/src/dbx/sql
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-07-05 11:12:37 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-07-05 11:12:37 +0200
commit66ac5c365191d7515f7f796e95a754f6882cda8e (patch)
tree99de370773a33d21a6f8bf13c72b842ec0e782a6 /src/dbx/sql
parent5a12e3e229e112e6b316c9ee9f762e36f321271d (diff)
Code simplification
Diffstat (limited to 'src/dbx/sql')
-rw-r--r--src/dbx/sql/000-genesis.sql26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/dbx/sql/000-genesis.sql b/src/dbx/sql/000-genesis.sql
index 56ae7c3..c16c6ae 100644
--- a/src/dbx/sql/000-genesis.sql
+++ b/src/dbx/sql/000-genesis.sql
@@ -7,30 +7,26 @@ CREATE TABLE migration (
INSERT INTO migration (id, latest) VALUES (1, -1);
CREATE TABLE mintages_s (
- country CHAR(2) NOT NULL COLLATE BINARY
+ country CHAR(2) NOT NULL COLLATE BINARY
CHECK(length(country) = 2),
- type INTEGER NOT NULL -- Codes correspond to contants in mintages.go
+ -- Codes correspond to contants in mintages.go
+ type INTEGER NOT NULL
CHECK(type BETWEEN 0 AND 2),
- year INTEGER NOT NULL,
- mintmark TEXT,
- [€0,01] INTEGER,
- [€0,02] INTEGER,
- [€0,05] INTEGER,
- [€0,10] INTEGER,
- [€0,20] INTEGER,
- [€0,50] INTEGER,
- [€1,00] INTEGER,
- [€2,00] INTEGER,
- reference TEXT
+ year INTEGER NOT NULL,
+ denomination REAL NOT NULL,
+ mintmark TEXT,
+ mintage INTEGER,
+ reference TEXT
);
CREATE TABLE mintages_c (
country CHAR(2) NOT NULL COLLATE BINARY
CHECK(length(country) = 2),
- type INTEGER NOT NULL -- Codes correspond to contants in mintages.go
+ -- Codes correspond to contants in mintages.go
+ type INTEGER NOT NULL
CHECK(type BETWEEN 0 AND 2),
- name TEXT NOT NULL,
year INTEGER NOT NULL,
+ name TEXT NOT NULL,
number INTEGER NOT NULL,
mintmark TEXT,
mintage INTEGER,