Skip to content

Commit

Permalink
Add current topic migration (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhusar authored Sep 19, 2020
1 parent 4d68f4c commit 2c41cfc
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
9 changes: 9 additions & 0 deletions db/migrate/20200919092214_create_current_topic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class CreateCurrentTopic < ActiveRecord::Migration[6.0]
def change
create_table :current_topics do |t|
t.string :body
t.boolean :enabled
t.timestamps
end
end
end
50 changes: 49 additions & 1 deletion db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,38 @@ CREATE TABLE public.ar_internal_metadata (
);


--
-- Name: current_topics; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.current_topics (
id bigint NOT NULL,
body character varying,
enabled boolean,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: current_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.current_topics_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;


--
-- Name: current_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.current_topics_id_seq OWNED BY public.current_topics.id;


--
-- Name: journeys; Type: TABLE; Schema: public; Owner: -
--
Expand Down Expand Up @@ -723,6 +755,13 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
ALTER TABLE ONLY public.apps ALTER COLUMN id SET DEFAULT nextval('public.apps_id_seq'::regclass);


--
-- Name: current_topics id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.current_topics ALTER COLUMN id SET DEFAULT nextval('public.current_topics_id_seq'::regclass);


--
-- Name: journeys id; Type: DEFAULT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -823,6 +862,14 @@ ALTER TABLE ONLY public.ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);


--
-- Name: current_topics current_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.current_topics
ADD CONSTRAINT current_topics_pkey PRIMARY KEY (id);


--
-- Name: journeys journeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -1276,6 +1323,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20190915104202'),
('20191209121011'),
('20200316102804'),
('20200316104715');
('20200316104715'),
('20200919092214');


0 comments on commit 2c41cfc

Please sign in to comment.