Skip to content

Commit

Permalink
Added a default_value for Product#reading_cache column.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquaj committed Aug 31, 2017
1 parent 3766f4b commit 791e34e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
class AddReadingCacheToProduct < ActiveRecord::Migration
def change
add_column :products, :reading_cache, :jsonb
add_column :products, :reading_cache, :jsonb, default: {}
end
end
6 changes: 3 additions & 3 deletions db/structure.sql
Expand Up @@ -5888,7 +5888,7 @@ CREATE TABLE products (
end_of_life_reason character varying,
originator_id integer,
codes jsonb,
reading_cache jsonb
reading_cache jsonb DEFAULT '{}'::jsonb
);


Expand Down Expand Up @@ -17863,7 +17863,7 @@ INSERT INTO schema_migrations (version) VALUES ('20170530002312');

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

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

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

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

0 comments on commit 791e34e

Please sign in to comment.