X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1578bb430ce005137f49233ef87fac34ebc51e2e..32926d6543e52daa4db8e47c2870bef4d6bdf71d:/services/api/db/structure.sql

diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 756dfc90c1..0711f90251 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -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
