Skip to content

Commit

Permalink
Change prices.valid_from to NOT NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed Oct 16, 2017
1 parent 49745d7 commit 0883fce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ChangePriceValidFromToNotNull < ActiveRecord::Migration
def change
change_column_null :prices, :valid_from, false
end
end
4 changes: 3 additions & 1 deletion db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ ALTER SEQUENCE people_id_seq OWNED BY people.id;
CREATE TABLE prices (
id integer NOT NULL,
price_cents integer NOT NULL,
valid_from timestamp without time zone,
valid_from timestamp without time zone NOT NULL,
valid_to timestamp without time zone,
creator_str character varying,
updator_str character varying,
Expand Down Expand Up @@ -5076,3 +5076,5 @@ INSERT INTO schema_migrations (version) VALUES ('20171009080822');

INSERT INTO schema_migrations (version) VALUES ('20171009082321');

INSERT INTO schema_migrations (version) VALUES ('20171016053749');

0 comments on commit 0883fce

Please sign in to comment.