forked from e621ng/e621ng
[DB] Remove some dev/prod differences
This commit is contained in:
parent
a5df59da89
commit
a2c4f4f4a5
7
db/migrate/20230204141325_dev_prod_cleanup.rb
Normal file
7
db/migrate/20230204141325_dev_prod_cleanup.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class DevProdCleanup < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
execute("DROP TYPE IF EXISTS post_status")
|
||||
execute("DROP INDEX IF EXISTS index_users_on_name_trgm")
|
||||
drop_table :janitor_trials
|
||||
end
|
||||
end
|
6
db/migrate/20230210092829_drop_email_unique.rb
Normal file
6
db/migrate/20230210092829_drop_email_unique.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class DropEmailUnique < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
remove_index :users, name: :index_users_on_email
|
||||
add_index :users, :email
|
||||
end
|
||||
end
|
@ -985,41 +985,6 @@ CREATE SEQUENCE public.ip_bans_id_seq
|
||||
ALTER SEQUENCE public.ip_bans_id_seq OWNED BY public.ip_bans.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: janitor_trials; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.janitor_trials (
|
||||
id integer NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
user_id integer NOT NULL,
|
||||
original_level integer,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
status character varying DEFAULT 'active'::character varying NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: janitor_trials_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.janitor_trials_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: janitor_trials_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.janitor_trials_id_seq OWNED BY public.janitor_trials.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: mascots; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -2642,13 +2607,6 @@ ALTER TABLE ONLY public.help_pages ALTER COLUMN id SET DEFAULT nextval('public.h
|
||||
ALTER TABLE ONLY public.ip_bans ALTER COLUMN id SET DEFAULT nextval('public.ip_bans_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: janitor_trials id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.janitor_trials ALTER COLUMN id SET DEFAULT nextval('public.janitor_trials_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: mascots id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3101,14 +3059,6 @@ ALTER TABLE ONLY public.ip_bans
|
||||
ADD CONSTRAINT ip_bans_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: janitor_trials janitor_trials_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.janitor_trials
|
||||
ADD CONSTRAINT janitor_trials_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: mascots mascots_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3799,13 +3749,6 @@ CREATE INDEX index_forum_topics_on_updated_at ON public.forum_topics USING btree
|
||||
CREATE UNIQUE INDEX index_ip_bans_on_ip_addr ON public.ip_bans USING btree (ip_addr);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_janitor_trials_on_user_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_janitor_trials_on_user_id ON public.janitor_trials USING btree (user_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_mascots_on_creator_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4356,7 +4299,7 @@ CREATE UNIQUE INDEX index_user_statuses_on_user_id ON public.user_statuses USING
|
||||
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);
|
||||
CREATE INDEX index_users_on_email ON public.users USING btree (email);
|
||||
|
||||
|
||||
--
|
||||
@ -4373,13 +4316,6 @@ CREATE INDEX index_users_on_last_ip_addr ON public.users USING btree (last_ip_ad
|
||||
CREATE UNIQUE INDEX index_users_on_name ON public.users USING btree (lower((name)::text));
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_users_on_name_trgm; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_users_on_name_trgm ON public.users USING gin (lower((name)::text) public.gin_trgm_ops);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_wiki_page_versions_on_created_at; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4799,6 +4735,8 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20220710133556'),
|
||||
('20220810131625'),
|
||||
('20221014085948'),
|
||||
('20230203162010');
|
||||
('20230203162010'),
|
||||
('20230204141325'),
|
||||
('20230210092829');
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user