Sha256: 60b8e4dd22f1387d150afd246451cf82cf06da6d9032b265b8a4b90f7cbef7d1

Contents?: true

Size: 600 Bytes

Versions: 9

Compression:

Stored size: 600 Bytes

Contents

CREATE TABLE public.event_types
(
    id              bigserial         NOT NULL,
    type            character varying NOT NULL
);

ALTER TABLE ONLY public.events ADD COLUMN event_type_id bigint;

ALTER TABLE ONLY public.event_types
    ADD CONSTRAINT event_types_pkey PRIMARY KEY (id);

ALTER TABLE ONLY public.events
    ADD CONSTRAINT events_event_type_fk FOREIGN KEY (event_type_id)
        REFERENCES public.event_types (id);

CREATE UNIQUE INDEX idx_event_types_type ON public.event_types USING btree (type);
CREATE INDEX idx_events_event_type_id ON public.events USING btree (event_type_id);

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pg_eventstore-0.6.0 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.5.3 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.5.2 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.5.0 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.4.0 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.3.0 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.2.6 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.2.5 db/migrations/3_extract_type_into_separate_table.sql
pg_eventstore-0.2.4 db/migrations/3_extract_type_into_separate_table.sql