| |   |
| 1 | -- |
| 2 | -- PostgreSQL database dump |
| 3 | -- |
| 4 | |
| 5 | SET client_encoding = 'UTF8'; |
| 6 | SET standard_conforming_strings = off; |
| 7 | SET check_function_bodies = false; |
| 8 | SET client_min_messages = warning; |
| 9 | SET escape_string_warning = off; |
| 10 | |
| 11 | -- |
| 12 | -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - |
| 13 | -- |
| 14 | |
| 15 | COMMENT ON SCHEMA public IS 'Standard public schema'; |
| 16 | |
| 17 | |
| 18 | SET search_path = public, pg_catalog; |
| 19 | |
| 20 | SET default_tablespace = ''; |
| 21 | |
| 22 | SET default_with_oids = false; |
| 23 | |
| 24 | -- |
| 25 | -- Name: comments; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 26 | -- |
| 27 | |
| 28 | CREATE TABLE comments ( |
| 29 | id integer NOT NULL, |
| 30 | user_id integer NOT NULL, |
| 31 | repository_id integer NOT NULL, |
| 32 | sha1 character varying(255) NOT NULL, |
| 33 | body text, |
| 34 | created_at timestamp without time zone, |
| 35 | updated_at timestamp without time zone |
| 36 | ); |
| 37 | |
| 38 | |
| 39 | -- |
| 40 | -- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 41 | -- |
| 42 | |
| 43 | CREATE SEQUENCE comments_id_seq |
| 44 | START WITH 4 |
| 45 | INCREMENT BY 1 |
| 46 | NO MAXVALUE |
| 47 | NO MINVALUE |
| 48 | CACHE 1; |
| 49 | |
| 50 | |
| 51 | -- |
| 52 | -- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 53 | -- |
| 54 | |
| 55 | ALTER SEQUENCE comments_id_seq OWNED BY comments.id; |
| 56 | |
| 57 | |
| 58 | -- |
| 59 | -- Name: committerships; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 60 | -- |
| 61 | |
| 62 | CREATE TABLE committerships ( |
| 63 | id integer NOT NULL, |
| 64 | user_id integer, |
| 65 | repository_id integer, |
| 66 | kind integer DEFAULT 2, |
| 67 | created_at timestamp without time zone, |
| 68 | updated_at timestamp without time zone |
| 69 | ); |
| 70 | |
| 71 | |
| 72 | -- |
| 73 | -- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 74 | -- |
| 75 | |
| 76 | CREATE SEQUENCE permissions_id_seq |
| 77 | START WITH 3 |
| 78 | INCREMENT BY 1 |
| 79 | NO MAXVALUE |
| 80 | NO MINVALUE |
| 81 | CACHE 1; |
| 82 | |
| 83 | |
| 84 | -- |
| 85 | -- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 86 | -- |
| 87 | |
| 88 | ALTER SEQUENCE permissions_id_seq OWNED BY committerships.id; |
| 89 | |
| 90 | |
| 91 | -- |
| 92 | -- Name: projects; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 93 | -- |
| 94 | |
| 95 | CREATE TABLE projects ( |
| 96 | id integer NOT NULL, |
| 97 | title character varying(255), |
| 98 | description text, |
| 99 | user_id integer, |
| 100 | created_at timestamp without time zone, |
| 101 | updated_at timestamp without time zone, |
| 102 | slug character varying(255), |
| 103 | license character varying(255), |
| 104 | home_url character varying(255), |
| 105 | mailinglist_url character varying(255), |
| 106 | bugtracker_url character varying(255) |
| 107 | ); |
| 108 | |
| 109 | |
| 110 | -- |
| 111 | -- Name: projects_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 112 | -- |
| 113 | |
| 114 | CREATE SEQUENCE projects_id_seq |
| 115 | START WITH 3 |
| 116 | INCREMENT BY 1 |
| 117 | NO MAXVALUE |
| 118 | NO MINVALUE |
| 119 | CACHE 1; |
| 120 | |
| 121 | |
| 122 | -- |
| 123 | -- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 124 | -- |
| 125 | |
| 126 | ALTER SEQUENCE projects_id_seq OWNED BY projects.id; |
| 127 | |
| 128 | |
| 129 | -- |
| 130 | -- Name: repositories; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 131 | -- |
| 132 | |
| 133 | CREATE TABLE repositories ( |
| 134 | id integer NOT NULL, |
| 135 | name character varying(255), |
| 136 | project_id integer, |
| 137 | user_id integer, |
| 138 | created_at timestamp without time zone, |
| 139 | updated_at timestamp without time zone, |
| 140 | mainline boolean DEFAULT false, |
| 141 | parent_id integer, |
| 142 | ready boolean DEFAULT false |
| 143 | ); |
| 144 | |
| 145 | |
| 146 | -- |
| 147 | -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 148 | -- |
| 149 | |
| 150 | CREATE SEQUENCE repositories_id_seq |
| 151 | START WITH 4 |
| 152 | INCREMENT BY 1 |
| 153 | NO MAXVALUE |
| 154 | NO MINVALUE |
| 155 | CACHE 1; |
| 156 | |
| 157 | |
| 158 | -- |
| 159 | -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 160 | -- |
| 161 | |
| 162 | ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id; |
| 163 | |
| 164 | |
| 165 | -- |
| 166 | -- Name: schema_info; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 167 | -- |
| 168 | |
| 169 | CREATE TABLE schema_info ( |
| 170 | version integer |
| 171 | ); |
| 172 | |
| 173 | |
| 174 | -- |
| 175 | -- Name: ssh_keys; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 176 | -- |
| 177 | |
| 178 | CREATE TABLE ssh_keys ( |
| 179 | id integer NOT NULL, |
| 180 | user_id integer, |
| 181 | "key" text, |
| 182 | created_at timestamp without time zone, |
| 183 | updated_at timestamp without time zone, |
| 184 | ready boolean DEFAULT false |
| 185 | ); |
| 186 | |
| 187 | |
| 188 | -- |
| 189 | -- Name: ssh_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 190 | -- |
| 191 | |
| 192 | CREATE SEQUENCE ssh_keys_id_seq |
| 193 | START WITH 3 |
| 194 | INCREMENT BY 1 |
| 195 | NO MAXVALUE |
| 196 | NO MINVALUE |
| 197 | CACHE 1; |
| 198 | |
| 199 | |
| 200 | -- |
| 201 | -- Name: ssh_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 202 | -- |
| 203 | |
| 204 | ALTER SEQUENCE ssh_keys_id_seq OWNED BY ssh_keys.id; |
| 205 | |
| 206 | |
| 207 | -- |
| 208 | -- Name: taggings; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 209 | -- |
| 210 | |
| 211 | CREATE TABLE taggings ( |
| 212 | id integer NOT NULL, |
| 213 | tag_id integer, |
| 214 | taggable_id integer, |
| 215 | taggable_type character varying(255), |
| 216 | created_at timestamp without time zone |
| 217 | ); |
| 218 | |
| 219 | |
| 220 | -- |
| 221 | -- Name: taggings_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 222 | -- |
| 223 | |
| 224 | CREATE SEQUENCE taggings_id_seq |
| 225 | START WITH 1 |
| 226 | INCREMENT BY 1 |
| 227 | NO MAXVALUE |
| 228 | NO MINVALUE |
| 229 | CACHE 1; |
| 230 | |
| 231 | |
| 232 | -- |
| 233 | -- Name: taggings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 234 | -- |
| 235 | |
| 236 | ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id; |
| 237 | |
| 238 | |
| 239 | -- |
| 240 | -- Name: tags; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 241 | -- |
| 242 | |
| 243 | CREATE TABLE tags ( |
| 244 | id integer NOT NULL, |
| 245 | name character varying(255) |
| 246 | ); |
| 247 | |
| 248 | |
| 249 | -- |
| 250 | -- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 251 | -- |
| 252 | |
| 253 | CREATE SEQUENCE tags_id_seq |
| 254 | START WITH 1 |
| 255 | INCREMENT BY 1 |
| 256 | NO MAXVALUE |
| 257 | NO MINVALUE |
| 258 | CACHE 1; |
| 259 | |
| 260 | |
| 261 | -- |
| 262 | -- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 263 | -- |
| 264 | |
| 265 | ALTER SEQUENCE tags_id_seq OWNED BY tags.id; |
| 266 | |
| 267 | |
| 268 | -- |
| 269 | -- Name: tasks; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 270 | -- |
| 271 | |
| 272 | CREATE TABLE tasks ( |
| 273 | id integer NOT NULL, |
| 274 | target_class character varying(255), |
| 275 | command character varying(255), |
| 276 | arguments text, |
| 277 | performed boolean DEFAULT false, |
| 278 | performed_at timestamp without time zone, |
| 279 | created_at timestamp without time zone, |
| 280 | updated_at timestamp without time zone, |
| 281 | target_id integer |
| 282 | ); |
| 283 | |
| 284 | |
| 285 | -- |
| 286 | -- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 287 | -- |
| 288 | |
| 289 | CREATE SEQUENCE tasks_id_seq |
| 290 | START WITH 3 |
| 291 | INCREMENT BY 1 |
| 292 | NO MAXVALUE |
| 293 | NO MINVALUE |
| 294 | CACHE 1; |
| 295 | |
| 296 | |
| 297 | -- |
| 298 | -- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 299 | -- |
| 300 | |
| 301 | ALTER SEQUENCE tasks_id_seq OWNED BY tasks.id; |
| 302 | |
| 303 | |
| 304 | -- |
| 305 | -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: |
| 306 | -- |
| 307 | |
| 308 | CREATE TABLE users ( |
| 309 | id integer NOT NULL, |
| 310 | "login" character varying(255), |
| 311 | email character varying(255), |
| 312 | crypted_password character varying(40), |
| 313 | salt character varying(40), |
| 314 | created_at timestamp without time zone, |
| 315 | updated_at timestamp without time zone, |
| 316 | remember_token character varying(255), |
| 317 | remember_token_expires_at timestamp without time zone, |
| 318 | activation_code character varying(40), |
| 319 | activated_at timestamp without time zone, |
| 320 | ssh_key_id integer, |
| 321 | fullname character varying(255), |
| 322 | url text |
| 323 | ); |
| 324 | |
| 325 | |
| 326 | -- |
| 327 | -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 328 | -- |
| 329 | |
| 330 | CREATE SEQUENCE users_id_seq |
| 331 | START WITH 3 |
| 332 | INCREMENT BY 1 |
| 333 | NO MAXVALUE |
| 334 | NO MINVALUE |
| 335 | CACHE 1; |
| 336 | |
| 337 | |
| 338 | -- |
| 339 | -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 340 | -- |
| 341 | |
| 342 | ALTER SEQUENCE users_id_seq OWNED BY users.id; |
| 343 | |
| 344 | |
| 345 | -- |
| 346 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 347 | -- |
| 348 | |
| 349 | ALTER TABLE comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass); |
| 350 | |
| 351 | |
| 352 | -- |
| 353 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 354 | -- |
| 355 | |
| 356 | ALTER TABLE committerships ALTER COLUMN id SET DEFAULT nextval('permissions_id_seq'::regclass); |
| 357 | |
| 358 | |
| 359 | -- |
| 360 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 361 | -- |
| 362 | |
| 363 | ALTER TABLE projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass); |
| 364 | |
| 365 | |
| 366 | -- |
| 367 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 368 | -- |
| 369 | |
| 370 | ALTER TABLE repositories ALTER COLUMN id SET DEFAULT nextval('repositories_id_seq'::regclass); |
| 371 | |
| 372 | |
| 373 | -- |
| 374 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 375 | -- |
| 376 | |
| 377 | ALTER TABLE ssh_keys ALTER COLUMN id SET DEFAULT nextval('ssh_keys_id_seq'::regclass); |
| 378 | |
| 379 | |
| 380 | -- |
| 381 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 382 | -- |
| 383 | |
| 384 | ALTER TABLE taggings ALTER COLUMN id SET DEFAULT nextval('taggings_id_seq'::regclass); |
| 385 | |
| 386 | |
| 387 | -- |
| 388 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 389 | -- |
| 390 | |
| 391 | ALTER TABLE tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); |
| 392 | |
| 393 | |
| 394 | -- |
| 395 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 396 | -- |
| 397 | |
| 398 | ALTER TABLE tasks ALTER COLUMN id SET DEFAULT nextval('tasks_id_seq'::regclass); |
| 399 | |
| 400 | |
| 401 | -- |
| 402 | -- Name: id; Type: DEFAULT; Schema: public; Owner: - |
| 403 | -- |
| 404 | |
| 405 | ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); |
| 406 | |
| 407 | |
| 408 | -- |
| 409 | -- Name: comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 410 | -- |
| 411 | |
| 412 | ALTER TABLE ONLY comments |
| 413 | ADD CONSTRAINT comments_pkey PRIMARY KEY (id); |
| 414 | |
| 415 | |
| 416 | -- |
| 417 | -- Name: permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 418 | -- |
| 419 | |
| 420 | ALTER TABLE ONLY committerships |
| 421 | ADD CONSTRAINT permissions_pkey PRIMARY KEY (id); |
| 422 | |
| 423 | |
| 424 | -- |
| 425 | -- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 426 | -- |
| 427 | |
| 428 | ALTER TABLE ONLY projects |
| 429 | ADD CONSTRAINT projects_pkey PRIMARY KEY (id); |
| 430 | |
| 431 | |
| 432 | -- |
| 433 | -- Name: repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 434 | -- |
| 435 | |
| 436 | ALTER TABLE ONLY repositories |
| 437 | ADD CONSTRAINT repositories_pkey PRIMARY KEY (id); |
| 438 | |
| 439 | |
| 440 | -- |
| 441 | -- Name: ssh_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 442 | -- |
| 443 | |
| 444 | ALTER TABLE ONLY ssh_keys |
| 445 | ADD CONSTRAINT ssh_keys_pkey PRIMARY KEY (id); |
| 446 | |
| 447 | |
| 448 | -- |
| 449 | -- Name: taggings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 450 | -- |
| 451 | |
| 452 | ALTER TABLE ONLY taggings |
| 453 | ADD CONSTRAINT taggings_pkey PRIMARY KEY (id); |
| 454 | |
| 455 | |
| 456 | -- |
| 457 | -- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 458 | -- |
| 459 | |
| 460 | ALTER TABLE ONLY tags |
| 461 | ADD CONSTRAINT tags_pkey PRIMARY KEY (id); |
| 462 | |
| 463 | |
| 464 | -- |
| 465 | -- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 466 | -- |
| 467 | |
| 468 | ALTER TABLE ONLY tasks |
| 469 | ADD CONSTRAINT tasks_pkey PRIMARY KEY (id); |
| 470 | |
| 471 | |
| 472 | -- |
| 473 | -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
| 474 | -- |
| 475 | |
| 476 | ALTER TABLE ONLY users |
| 477 | ADD CONSTRAINT users_pkey PRIMARY KEY (id); |
| 478 | |
| 479 | |
| 480 | -- |
| 481 | -- Name: index_comments_on_repository_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 482 | -- |
| 483 | |
| 484 | CREATE INDEX index_comments_on_repository_id ON comments USING btree (repository_id); |
| 485 | |
| 486 | |
| 487 | -- |
| 488 | -- Name: index_comments_on_sha1; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 489 | -- |
| 490 | |
| 491 | CREATE INDEX index_comments_on_sha1 ON comments USING btree (sha1); |
| 492 | |
| 493 | |
| 494 | -- |
| 495 | -- Name: index_comments_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 496 | -- |
| 497 | |
| 498 | CREATE INDEX index_comments_on_user_id ON comments USING btree (user_id); |
| 499 | |
| 500 | |
| 501 | -- |
| 502 | -- Name: index_permissions_on_repository_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 503 | -- |
| 504 | |
| 505 | CREATE INDEX index_permissions_on_repository_id ON committerships USING btree (repository_id); |
| 506 | |
| 507 | |
| 508 | -- |
| 509 | -- Name: index_permissions_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 510 | -- |
| 511 | |
| 512 | CREATE INDEX index_permissions_on_user_id ON committerships USING btree (user_id); |
| 513 | |
| 514 | |
| 515 | -- |
| 516 | -- Name: index_projects_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 517 | -- |
| 518 | |
| 519 | CREATE INDEX index_projects_on_name ON projects USING btree (title); |
| 520 | |
| 521 | |
| 522 | -- |
| 523 | -- Name: index_projects_on_slug; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 524 | -- |
| 525 | |
| 526 | CREATE UNIQUE INDEX index_projects_on_slug ON projects USING btree (slug); |
| 527 | |
| 528 | |
| 529 | -- |
| 530 | -- Name: index_projects_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 531 | -- |
| 532 | |
| 533 | CREATE INDEX index_projects_on_user_id ON projects USING btree (user_id); |
| 534 | |
| 535 | |
| 536 | -- |
| 537 | -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 538 | -- |
| 539 | |
| 540 | CREATE INDEX index_repositories_on_name ON repositories USING btree (name); |
| 541 | |
| 542 | |
| 543 | -- |
| 544 | -- Name: index_repositories_on_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 545 | -- |
| 546 | |
| 547 | CREATE INDEX index_repositories_on_parent_id ON repositories USING btree (parent_id); |
| 548 | |
| 549 | |
| 550 | -- |
| 551 | -- Name: index_repositories_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 552 | -- |
| 553 | |
| 554 | CREATE INDEX index_repositories_on_project_id ON repositories USING btree (project_id); |
| 555 | |
| 556 | |
| 557 | -- |
| 558 | -- Name: index_repositories_on_ready; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 559 | -- |
| 560 | |
| 561 | CREATE INDEX index_repositories_on_ready ON repositories USING btree (ready); |
| 562 | |
| 563 | |
| 564 | -- |
| 565 | -- Name: index_repositories_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 566 | -- |
| 567 | |
| 568 | CREATE INDEX index_repositories_on_user_id ON repositories USING btree (user_id); |
| 569 | |
| 570 | |
| 571 | -- |
| 572 | -- Name: index_ssh_keys_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 573 | -- |
| 574 | |
| 575 | CREATE INDEX index_ssh_keys_on_user_id ON ssh_keys USING btree (user_id); |
| 576 | |
| 577 | |
| 578 | -- |
| 579 | -- Name: index_taggings_on_tag_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 580 | -- |
| 581 | |
| 582 | CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id); |
| 583 | |
| 584 | |
| 585 | -- |
| 586 | -- Name: index_taggings_on_taggable_id_and_taggable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 587 | -- |
| 588 | |
| 589 | CREATE INDEX index_taggings_on_taggable_id_and_taggable_type ON taggings USING btree (taggable_id, taggable_type); |
| 590 | |
| 591 | |
| 592 | -- |
| 593 | -- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 594 | -- |
| 595 | |
| 596 | CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name); |
| 597 | |
| 598 | |
| 599 | -- |
| 600 | -- Name: index_tasks_on_performed; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 601 | -- |
| 602 | |
| 603 | CREATE INDEX index_tasks_on_performed ON tasks USING btree (performed); |
| 604 | |
| 605 | |
| 606 | -- |
| 607 | -- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 608 | -- |
| 609 | |
| 610 | CREATE INDEX index_users_on_email ON users USING btree (email); |
| 611 | |
| 612 | |
| 613 | -- |
| 614 | -- Name: index_users_on_login; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 615 | -- |
| 616 | |
| 617 | CREATE INDEX index_users_on_login ON users USING btree ("login"); |
| 618 | |
| 619 | |
| 620 | -- |
| 621 | -- Name: index_users_on_ssh_key_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
| 622 | -- |
| 623 | |
| 624 | CREATE INDEX index_users_on_ssh_key_id ON users USING btree (ssh_key_id); |
| 625 | |
| 626 | |
| 627 | -- |
| 628 | -- PostgreSQL database dump complete |
| 629 | -- |
| 630 | |
| 631 | INSERT INTO schema_info (version) VALUES (19) |
| toggle raw diff |
--- /dev/null
+++ b/db/development_structure.sql
@@ -0,0 +1,631 @@
+--
+-- PostgreSQL database dump
+--
+
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = off;
+SET check_function_bodies = false;
+SET client_min_messages = warning;
+SET escape_string_warning = off;
+
+--
+-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: -
+--
+
+COMMENT ON SCHEMA public IS 'Standard public schema';
+
+
+SET search_path = public, pg_catalog;
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- Name: comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE comments (
+ id integer NOT NULL,
+ user_id integer NOT NULL,
+ repository_id integer NOT NULL,
+ sha1 character varying(255) NOT NULL,
+ body text,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone
+);
+
+
+--
+-- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE comments_id_seq
+ START WITH 4
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE comments_id_seq OWNED BY comments.id;
+
+
+--
+-- Name: committerships; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE committerships (
+ id integer NOT NULL,
+ user_id integer,
+ repository_id integer,
+ kind integer DEFAULT 2,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone
+);
+
+
+--
+-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE permissions_id_seq
+ START WITH 3
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE permissions_id_seq OWNED BY committerships.id;
+
+
+--
+-- Name: projects; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE projects (
+ id integer NOT NULL,
+ title character varying(255),
+ description text,
+ user_id integer,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ slug character varying(255),
+ license character varying(255),
+ home_url character varying(255),
+ mailinglist_url character varying(255),
+ bugtracker_url character varying(255)
+);
+
+
+--
+-- Name: projects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE projects_id_seq
+ START WITH 3
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE projects_id_seq OWNED BY projects.id;
+
+
+--
+-- Name: repositories; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE repositories (
+ id integer NOT NULL,
+ name character varying(255),
+ project_id integer,
+ user_id integer,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ mainline boolean DEFAULT false,
+ parent_id integer,
+ ready boolean DEFAULT false
+);
+
+
+--
+-- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE repositories_id_seq
+ START WITH 4
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id;
+
+
+--
+-- Name: schema_info; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE schema_info (
+ version integer
+);
+
+
+--
+-- Name: ssh_keys; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE ssh_keys (
+ id integer NOT NULL,
+ user_id integer,
+ "key" text,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ ready boolean DEFAULT false
+);
+
+
+--
+-- Name: ssh_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE ssh_keys_id_seq
+ START WITH 3
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: ssh_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE ssh_keys_id_seq OWNED BY ssh_keys.id;
+
+
+--
+-- Name: taggings; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE taggings (
+ id integer NOT NULL,
+ tag_id integer,
+ taggable_id integer,
+ taggable_type character varying(255),
+ created_at timestamp without time zone
+);
+
+
+--
+-- Name: taggings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE taggings_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: taggings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id;
+
+
+--
+-- Name: tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE tags (
+ id integer NOT NULL,
+ name character varying(255)
+);
+
+
+--
+-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE tags_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+--
+-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE tags_id_seq OWNED BY tags.id;
+
+
+--
+-- Name: tasks; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE tasks (
+ id integer NOT NULL,
+ target_class character varying(255),
+ comman |