Merge branch 'master' into 5383-api-db-current-time
[arvados.git] / services / api / db / structure.sql
index 756dfc90c1e22b26ff16240694e55bf6057d4da8..0711f9025190bbf2a125d52e343f39b07a984d9d 100644 (file)
@@ -168,7 +168,7 @@ CREATE TABLE collections (
     name character varying(255),
     description character varying(524288),
     properties text,
-    expires_at date,
+    expires_at timestamp without time zone,
     file_names character varying(8192)
 );
 
@@ -1303,7 +1303,7 @@ CREATE INDEX authorized_keys_search_index ON authorized_keys USING btree (uuid,
 -- Name: collection_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
-CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree (owner_uuid, name);
+CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree (owner_uuid, name) WHERE (expires_at IS NULL);
 
 
 --
@@ -2358,4 +2358,10 @@ INSERT INTO schema_migrations (version) VALUES ('20150203180223');
 
 INSERT INTO schema_migrations (version) VALUES ('20150206210804');
 
-INSERT INTO schema_migrations (version) VALUES ('20150206230342');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20150206230342');
+
+INSERT INTO schema_migrations (version) VALUES ('20150216193428');
+
+INSERT INTO schema_migrations (version) VALUES ('20150303210106');
+
+INSERT INTO schema_migrations (version) VALUES ('20150312151136');
\ No newline at end of file