--- /dev/null
+class CreateContainersAndRequests < ActiveRecord::Migration
+ def change
+ create_table :containers do |t|
+ t.string :uuid
+ t.string :owner_uuid
+ t.datetime :created_at
+ t.datetime :modified_at
+ t.string :modified_by_client_uuid
+ t.string :modified_by_user_uuid
+ t.string :state
+ t.datetime :started_at
+ t.datetime :finished_at
+ t.string :log
+ t.text :environment
+ t.string :cwd
+ t.string :command
+ t.string :output_path
+ t.string :mounts
+ t.string :runtime_constraints
+ t.string :output
+ t.string :container_image
+ t.float :progress
+ t.integer :priority
+
+ t.timestamps
+ end
+
+ create_table :container_requests do |t|
+ t.string :uuid
+ t.string :owner_uuid
+ t.datetime :created_at
+ t.datetime :modified_at
+ t.string :modified_by_client_uuid
+ t.string :modified_by_user_uuid
+ t.string :name
+ t.text :description
+ t.string :properties
+ t.string :state
+ t.string :requesting_container_uuid
+ t.string :container_uuid
+ t.integer :container_count_max
+ t.string :mounts
+ t.string :runtime_constraints
+ t.string :container_image
+ t.string :environment
+ t.string :cwd
+ t.string :command
+ t.string :output_path
+ t.integer :priority
+ t.datetime :expires_at
+ t.string :filters
+
+ t.timestamps
+ end
+
+ add_index :containers, :uuid, :unique => true
+ add_index :container_requests, :uuid, :unique => true
+ end
+end
ALTER SEQUENCE commits_id_seq OWNED BY commits.id;
+--
+-- Name: container_requests; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE container_requests (
+ id integer NOT NULL,
+ uuid character varying(255),
+ owner_uuid character varying(255),
+ created_at timestamp without time zone NOT NULL,
+ modified_at timestamp without time zone,
+ modified_by_client_uuid character varying(255),
+ modified_by_user_uuid character varying(255),
+ name character varying(255),
+ description text,
+ properties character varying(255),
+ state character varying(255),
+ requesting_container_uuid character varying(255),
+ container_uuid character varying(255),
+ container_count_max integer,
+ mounts character varying(255),
+ runtime_constraints character varying(255),
+ container_image character varying(255),
+ environment character varying(255),
+ cwd character varying(255),
+ command character varying(255),
+ output_path character varying(255),
+ priority integer,
+ expires_at timestamp without time zone,
+ filters character varying(255),
+ updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE container_requests_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE container_requests_id_seq OWNED BY container_requests.id;
+
+
+--
+-- Name: containers; Type: TABLE; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE TABLE containers (
+ id integer NOT NULL,
+ uuid character varying(255),
+ owner_uuid character varying(255),
+ created_at timestamp without time zone NOT NULL,
+ modified_at timestamp without time zone,
+ modified_by_client_uuid character varying(255),
+ modified_by_user_uuid character varying(255),
+ state character varying(255),
+ started_at timestamp without time zone,
+ finished_at timestamp without time zone,
+ log character varying(255),
+ environment text,
+ cwd character varying(255),
+ command character varying(255),
+ output_path character varying(255),
+ mounts character varying(255),
+ runtime_constraints character varying(255),
+ output character varying(255),
+ container_image character varying(255),
+ progress double precision,
+ priority integer,
+ updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE containers_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE containers_id_seq OWNED BY containers.id;
+
+
--
-- Name: groups; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY commits ALTER COLUMN id SET DEFAULT nextval('commits_id_seq'::regclass);
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY container_requests ALTER COLUMN id SET DEFAULT nextval('container_requests_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY containers ALTER COLUMN id SET DEFAULT nextval('containers_id_seq'::regclass);
+
+
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ADD CONSTRAINT commits_pkey PRIMARY KEY (id);
+--
+-- Name: container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY container_requests
+ ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+--
+
+ALTER TABLE ONLY containers
+ ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
+
+
--
-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON commits USING btree (repository_name, sha1);
+--
+-- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE UNIQUE INDEX index_container_requests_on_uuid ON container_requests USING btree (uuid);
+
+
+--
+-- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace:
+--
+
+CREATE UNIQUE INDEX index_containers_on_uuid ON containers USING btree (uuid);
+
+
--
-- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
INSERT INTO schema_migrations (version) VALUES ('20150512193020');
-INSERT INTO schema_migrations (version) VALUES ('20150526180251');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20150526180251');
+
+INSERT INTO schema_migrations (version) VALUES ('20151202151426');
\ No newline at end of file