Add versions table/model for prices

This commit is contained in:
Alex Sherman 2020-09-10 15:55:30 +05:00
parent e03ae63acf
commit 86ea2319c8
5 changed files with 92 additions and 16 deletions

View file

@ -371,6 +371,7 @@ CREATE TABLE public.bank_statements (
id integer NOT NULL,
bank_code character varying,
iban character varying,
import_file_path character varying,
queried_at timestamp without time zone,
created_at timestamp without time zone,
updated_at timestamp without time zone,
@ -777,6 +778,7 @@ CREATE TABLE public.domains (
id integer NOT NULL,
name character varying NOT NULL,
registrar_id integer NOT NULL,
registered_at timestamp without time zone,
valid_to timestamp without time zone NOT NULL,
registrant_id integer NOT NULL,
transfer_code character varying NOT NULL,
@ -1706,7 +1708,45 @@ ALTER SEQUENCE public.log_payment_orders_id_seq OWNED BY public.log_payment_orde
--
-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: log_prices; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.log_prices (
id bigint NOT NULL,
item_type character varying NOT NULL,
item_id integer NOT NULL,
event character varying NOT NULL,
whodunnit character varying,
object json,
object_changes json,
created_at timestamp without time zone,
session character varying,
children json,
uuid character varying
);
--
-- Name: log_prices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.log_prices_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: log_prices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.log_prices_id_seq OWNED BY public.log_prices.id;
--
-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.log_registrant_verifications (
@ -2084,7 +2124,7 @@ ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id;
--
-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: prices; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.prices (
@ -2096,7 +2136,9 @@ CREATE TABLE public.prices (
updated_at timestamp without time zone NOT NULL,
duration interval,
operation_category character varying,
zone_id integer NOT NULL
zone_id integer NOT NULL,
updator_str character varying,
creator_str character varying
);
@ -3302,7 +3344,15 @@ ALTER TABLE ONLY public.log_payment_orders
--
-- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: log_prices log_prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.log_prices
ADD CONSTRAINT log_prices_pkey PRIMARY KEY (id);
--
-- Name: log_registrant_verifications log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.log_registrant_verifications
@ -3310,7 +3360,7 @@ ALTER TABLE ONLY public.log_registrant_verifications
--
-- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: log_registrars log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.log_registrars
@ -4751,6 +4801,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20180825193437'),
('20180825232819'),
('20180826162821'),
('20180916133911'),
('20181001090536'),
('20181002090319'),
('20181017092829'),
@ -4824,7 +4875,6 @@ INSERT INTO "schema_migrations" (version) VALUES
('20191203083643'),
('20191206183853'),
('20191212133136'),
('20191217013225'),
('20191219112434'),
('20191219124429'),
('20191227110904'),
@ -4849,8 +4899,6 @@ INSERT INTO "schema_migrations" (version) VALUES
('20200812090409'),
('20200812125810'),
('20200908131554'),
('20200910085157');
INSERT INTO schema_migrations (version) VALUES ('20180916133911');
('20200910085157'),
('20200910102028');