Basic models set up

This commit is contained in:
Shrey 2015-05-16 14:08:50 +05:30 committed by Matt Amos
parent 2bae7cd298
commit 5add3cf671
11 changed files with 234 additions and 0 deletions

View file

@ -663,6 +663,42 @@ CREATE SEQUENCE gpx_files_id_seq
ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
--
-- Name: issues; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE issues (
id integer NOT NULL,
reportable_type character varying,
reportable_id integer,
user_id integer,
status integer,
resolved_at timestamp without time zone,
resolved_by integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: issues_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE issues_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: issues_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE issues_id_seq OWNED BY issues.id;
--
-- Name: languages; Type: TABLE; Schema: public; Owner: -
--
@ -964,6 +1000,39 @@ CREATE TABLE relations (
);
--
-- Name: reports; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE reports (
id integer NOT NULL,
issue_id integer,
user_id integer,
details text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE reports_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE reports_id_seq OWNED BY reports.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--
@ -1266,6 +1335,13 @@ ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tag
ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1308,6 +1384,13 @@ ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_
ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1472,6 +1555,14 @@ ALTER TABLE ONLY gpx_files
ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
--
-- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY issues
ADD CONSTRAINT issues_pkey PRIMARY KEY (id);
--
-- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -1568,6 +1659,14 @@ ALTER TABLE ONLY relations
ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
--
-- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY reports
ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
--
-- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -2554,6 +2653,10 @@ INSERT INTO schema_migrations (version) VALUES ('20150111192335');
INSERT INTO schema_migrations (version) VALUES ('20150222101847');
INSERT INTO schema_migrations (version) VALUES ('20150516073616');
INSERT INTO schema_migrations (version) VALUES ('20150516075620');
INSERT INTO schema_migrations (version) VALUES ('21');
INSERT INTO schema_migrations (version) VALUES ('22');