diff --git a/db/migrate/20210119195318_set_anonymous_to_default_to_false.rb b/db/migrate/20210119195318_set_anonymous_to_default_to_false.rb new file mode 100644 index 00000000..8d645463 --- /dev/null +++ b/db/migrate/20210119195318_set_anonymous_to_default_to_false.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later +# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE +class SetAnonymousToDefaultToFalse < ActiveRecord::Migration[6.1] + def change + change_column_default :supporters, :anonymous, from: nil, to: false + change_column_null :supporters, :anonymous, false, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 6e424758..be704bde 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2056,7 +2056,7 @@ CREATE TABLE public.supporters ( address character varying(255), city character varying(255), state_code character varying(255), - anonymous boolean, + anonymous boolean DEFAULT false NOT NULL, zip_code character varying(255), latitude double precision, longitude double precision, @@ -4159,6 +4159,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20210111220133'), ('20210114213034'), ('20210115203009'), -('20210115230815'); +('20210115230815'), +('20210119195318');