From 86e9cf1d053822a4143cf4ca734a7780be58a38c Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 2 Apr 2022 23:30:08 -0500 Subject: [PATCH] artist urls: make normalized_url nullable. Make the normalized_url column nullable in preparation for dropping it. --- ...0403042706_make_normalized_url_nullable_on_artist_urls.rb | 5 +++++ db/structure.sql | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20220403042706_make_normalized_url_nullable_on_artist_urls.rb diff --git a/db/migrate/20220403042706_make_normalized_url_nullable_on_artist_urls.rb b/db/migrate/20220403042706_make_normalized_url_nullable_on_artist_urls.rb new file mode 100644 index 000000000..c187cca4c --- /dev/null +++ b/db/migrate/20220403042706_make_normalized_url_nullable_on_artist_urls.rb @@ -0,0 +1,5 @@ +class MakeNormalizedURLNullableOnArtistURLs < ActiveRecord::Migration[7.0] + def change + change_column_null :artist_urls, :normalized_url, true + end +end diff --git a/db/structure.sql b/db/structure.sql index 30de5fb6b..27405af0b 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -222,7 +222,7 @@ CREATE TABLE public.artist_urls ( id integer NOT NULL, artist_id integer NOT NULL, url text NOT NULL, - normalized_url text NOT NULL, + normalized_url text, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, is_active boolean DEFAULT true NOT NULL @@ -5787,6 +5787,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20220210171310'), ('20220210200157'), ('20220211075129'), -('20220318082614'); +('20220318082614'), +('20220403042706');