Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
DB Scritps: Added DDL scripts for spar mapper table
Browse files Browse the repository at this point in the history
  • Loading branch information
lalithkota committed Jan 17, 2024
1 parent 57b453b commit d4867f5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions db_scripts/0.1.0/ddl/02.tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@ CREATE TABLE dfsp_level_values (
updated_at timestamp without time zone,
active boolean NOT NULL
);

CREATE TABLE id_fa_mappings (
id integer NOT NULL,
name character varying,
id_value character varying NOT NULL,
fa_value character varying NOT NULL,
phone character varying,
additional_info json,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone,
active boolean NOT NULL
);
10 changes: 10 additions & 0 deletions db_scripts/0.1.0/ddl/03.sequences.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ CREATE SEQUENCE login_providers_id_seq
CACHE 1;

ALTER SEQUENCE login_providers_id_seq OWNED BY login_providers.id;

CREATE SEQUENCE id_fa_mappings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;

ALTER SEQUENCE id_fa_mappings_id_seq OWNED BY id_fa_mappings.id;
2 changes: 2 additions & 0 deletions db_scripts/0.1.0/ddl/04.defaults.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ ALTER TABLE ONLY fa_construct_strategy ALTER COLUMN id SET DEFAULT nextval('fa_c
ALTER TABLE ONLY id_providers ALTER COLUMN id SET DEFAULT nextval('id_providers_id_seq'::regclass);

ALTER TABLE ONLY login_providers ALTER COLUMN id SET DEFAULT nextval('login_providers_id_seq'::regclass);

ALTER TABLE ONLY id_fa_mappings ALTER COLUMN id SET DEFAULT nextval('id_fa_mappings_id_seq'::regclass);
3 changes: 3 additions & 0 deletions db_scripts/0.1.0/ddl/05.constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ALTER TABLE ONLY id_providers
ALTER TABLE ONLY login_providers
ADD CONSTRAINT login_providers_pkey PRIMARY KEY (id);

ALTER TABLE ONLY id_fa_mappings
ADD CONSTRAINT id_fa_mappings_pkey PRIMARY KEY (id);

ALTER TABLE ONLY dfsp_level_values
ADD CONSTRAINT dfsp_level_values_dfsp_provider_id_fkey FOREIGN KEY (dfsp_provider_id) REFERENCES dfsp_providers(id);

Expand Down
3 changes: 3 additions & 0 deletions db_scripts/0.1.0/ddl/06.index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE INDEX ix_id_fa_mappings_fa_value ON id_fa_mappings USING btree (fa_value);

CREATE UNIQUE INDEX ix_id_fa_mappings_id_value ON id_fa_mappings USING btree (id_value);

0 comments on commit d4867f5

Please sign in to comment.