uploads: mark old columns as ignored.

Mark old columns as ignored in preparation for dropping them. Make the
rating and tag_string nullable so they don't have to be set when
creating uploads and can be ignored too.
This commit is contained in:
evazion
2022-02-02 22:10:11 -06:00
parent 054b0b4d0a
commit 2dfec29da7
5 changed files with 20 additions and 10 deletions

View File

@@ -0,0 +1,6 @@
class DropNotNullConstraintsFromUploads < ActiveRecord::Migration[7.0]
def change
change_column_null(:uploads, :rating, true)
change_column_null(:uploads, :tag_string, true)
end
end

View File

@@ -1947,10 +1947,10 @@ CREATE TABLE public.uploads (
source text,
file_path character varying,
content_type character varying,
rating character(1) NOT NULL,
rating character(1),
uploader_id integer NOT NULL,
uploader_ip_addr inet NOT NULL,
tag_string text NOT NULL,
tag_string text,
status text DEFAULT 'pending'::text NOT NULL,
backtrace text,
post_id integer,
@@ -5775,6 +5775,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220110171023'),
('20220110171024'),
('20220120233850'),
('20220124195900');
('20220124195900'),
('20220203040648');