Restore versions DB table and add learning tests

This commit is contained in:
Artur Beljajev 2019-03-01 19:53:37 +02:00
parent 5c8e507b93
commit 647bf4c397
5 changed files with 84 additions and 8 deletions

View file

@ -2363,7 +2363,13 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
CREATE TABLE public.versions (
id integer NOT NULL,
depricated_table_but_somehow_paper_trail_tests_fails_without_it text
item_type character varying NOT NULL,
item_id integer NOT NULL,
event character varying NOT NULL,
whodunnit character varying,
object text,
created_at timestamp without time zone,
object_changes jsonb
);
@ -3980,6 +3986,13 @@ CREATE INDEX index_users_on_identity_code ON public.users USING btree (identity_
CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_id);
--
-- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_versions_on_item_type_and_item_id ON public.versions USING btree (item_type, item_id);
--
-- Name: index_whois_records_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@ -4927,6 +4940,10 @@ INSERT INTO schema_migrations (version) VALUES ('20190102144032');
INSERT INTO schema_migrations (version) VALUES ('20190209150026');
INSERT INTO schema_migrations (version) VALUES ('20190302091059');
INSERT INTO schema_migrations (version) VALUES ('20190302111152');
INSERT INTO schema_migrations (version) VALUES ('20190311111718');
INSERT INTO schema_migrations (version) VALUES ('20190312211614');