mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 05:14:00 +02:00
SQL schema v002 script part 1
This commit is contained in:
parent
2f601a0b1a
commit
3000731ac7
3 changed files with 91 additions and 10 deletions
|
@ -1,11 +1,11 @@
|
|||
CREATE SEQUENCE currencies_id_seq START WITH 1 INCREMENT BY 1;
|
||||
CREATE SEQUENCE currencies_id_seq START WITH 2 INCREMENT BY 1;
|
||||
CREATE TABLE currencies (
|
||||
id INTEGER PRIMARY KEY NOT NULL DEFAULT NEXTVAL('currencies_id_seq'::regclass),
|
||||
name VARCHAR(128) NOT NULL,
|
||||
UNIQUE(name)
|
||||
);
|
||||
-- Some code depends on the primary physical currency to have id 1.
|
||||
INSERT INTO currencies (name) VALUES ('Kč');
|
||||
INSERT INTO currencies (id, name) VALUES (1, 'Kč');
|
||||
|
||||
CREATE TYPE exchange_rate_direction AS ENUM ('source_to_target', 'target_to_source');
|
||||
CREATE TABLE exchange_rates (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue