Skip to content

Commit

Permalink
Run migration
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmsmith committed Aug 27, 2023
1 parent 760414f commit afe3584
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion db/migrate/20230827154404_track_relationship_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def change
end

change_table(:relationships, bulk: true) do |t|
t.column(:status, :relationship_status, null: false)
# Will make this non-null in a future migration
t.column(:status, :relationship_status)
end
end
end
17 changes: 15 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ CREATE TYPE public.grade_type AS ENUM (
);


--
-- Name: relationship_status; Type: TYPE; Schema: public; Owner: -
--

CREATE TYPE public.relationship_status AS ENUM (
'planned',
'subscribed',
'enrolled'
);


--
-- Name: review_status; Type: TYPE; Schema: public; Owner: -
--
Expand Down Expand Up @@ -970,7 +981,8 @@ CREATE TABLE public.relationships (
section_id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
notify boolean DEFAULT false NOT NULL
notify boolean DEFAULT false NOT NULL,
status public.relationship_status
);


Expand Down Expand Up @@ -2517,6 +2529,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20230430161016'),
('20230511033013'),
('20230718192047'),
('20230820174337');
('20230820174337'),
('20230827154404');


0 comments on commit afe3584

Please sign in to comment.