Remove unused KeyValue model (#3206).

This commit is contained in:
evazion
2017-07-09 14:09:02 -05:00
parent af35c82d96
commit f3b0a0a9e9
3 changed files with 11 additions and 58 deletions

View File

@@ -1,4 +0,0 @@
class KeyValue < ApplicationRecord
validates_uniqueness_of :key
attr_accessible :key, :value
end

View File

@@ -0,0 +1,9 @@
class DropKeyValues < ActiveRecord::Migration
def up
drop_table :key_values
end
def down
raise ActiveRecord::IrreversibleMigration, "Can't recover the lost data"
end
end

View File

@@ -2304,38 +2304,6 @@ CREATE SEQUENCE janitor_trials_id_seq
ALTER SEQUENCE janitor_trials_id_seq OWNED BY janitor_trials.id;
--
-- Name: key_values; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE key_values (
id integer NOT NULL,
key character varying NOT NULL,
value text,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: key_values_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE key_values_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: key_values_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE key_values_id_seq OWNED BY key_values.id;
--
-- Name: mod_actions; Type: TABLE; Schema: public; Owner: -
--
@@ -4220,13 +4188,6 @@ ALTER TABLE ONLY ip_bans ALTER COLUMN id SET DEFAULT nextval('ip_bans_id_seq'::r
ALTER TABLE ONLY janitor_trials ALTER COLUMN id SET DEFAULT nextval('janitor_trials_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY key_values ALTER COLUMN id SET DEFAULT nextval('key_values_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -4609,14 +4570,6 @@ ALTER TABLE ONLY janitor_trials
ADD CONSTRAINT janitor_trials_pkey PRIMARY KEY (id);
--
-- Name: key_values_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY key_values
ADD CONSTRAINT key_values_pkey PRIMARY KEY (id);
--
-- Name: mod_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@@ -6631,13 +6584,6 @@ CREATE UNIQUE INDEX index_ip_bans_on_ip_addr ON ip_bans USING btree (ip_addr);
CREATE INDEX index_janitor_trials_on_user_id ON janitor_trials USING btree (user_id);
--
-- Name: index_key_values_on_key; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_key_values_on_key ON key_values USING btree (key);
--
-- Name: index_news_updates_on_created_at; Type: INDEX; Schema: public; Owner: -
--
@@ -7565,3 +7511,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170608043651');
INSERT INTO schema_migrations (version) VALUES ('20170613200356');
INSERT INTO schema_migrations (version) VALUES ('20170709190409');