-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming deposition migration to more recent unix ts (#190)
- Loading branch information
Showing
10 changed files
with
81 additions
and
73 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
...server/migrations/cryoetdataportal/1721456233007_create_table_public_depositions/down.sql
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
api_server/migrations/cryoetdataportal/1721456233007_create_table_public_depositions/up.sql
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...migrations/cryoetdataportal/1721456814770_create_table_public_deposition_authors/down.sql
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...r/migrations/cryoetdataportal/1721456814770_create_table_public_deposition_authors/up.sql
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...oetdataportal/1721457811281_alter_table_public_datasets_add_column_deposition_id/down.sql
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...ryoetdataportal/1721457811281_alter_table_public_datasets_add_column_deposition_id/up.sql
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...tdataportal/1721457837653_alter_table_public_tiltseries_add_column_deposition_id/down.sql
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...oetdataportal/1721457837653_alter_table_public_tiltseries_add_column_deposition_id/up.sql
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
api_server/migrations/cryoetdataportal/1722555527000_deposition_entities/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
DROP INDEX IF EXISTS "public"."tiltseries_deposition_id"; | ||
ALTER TABLE "public"."tiltseries" DROP COLUMN "deposition_id" INTEGER NULL; | ||
|
||
DROP INDEX IF EXISTS "public"."dataset_deposition_id"; | ||
ALTER TABLE "public"."datasets" DROP COLUMN "deposition_id"; | ||
|
||
DROP TABLE "public"."deposition_authors" cascade; | ||
|
||
DROP INDEX IF EXISTS "public"."depositions_type"; | ||
DROP TABLE "public"."depositions" cascade; |
70 changes: 70 additions & 0 deletions
70
api_server/migrations/cryoetdataportal/1722555527000_deposition_entities/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
CREATE TABLE "public"."depositions" ( | ||
"id" serial NOT NULL, | ||
"title" varchar NOT NULL, | ||
"description" varchar NOT NULL, | ||
"deposition_date" date NOT NULL, | ||
"release_date" date NOT NULL, | ||
"last_modified_date" date NOT NULL, | ||
"related_database_entries" varchar, | ||
"deposition_publications" varchar, | ||
"deposition_types" varchar NOT NULL, | ||
"s3_prefix" varchar, | ||
"https_prefix" varchar, | ||
PRIMARY KEY ("id") , UNIQUE ("id") | ||
); | ||
|
||
COMMENT ON TABLE "public"."depositions" IS E'Deposition metadata'; | ||
COMMENT ON COLUMN public.depositions.id IS 'Numeric identifier for this depositions'; | ||
COMMENT ON COLUMN public.depositions.title IS 'Title for the deposition'; | ||
COMMENT ON COLUMN public.depositions.description IS 'Description for the deposition'; | ||
COMMENT ON COLUMN public.depositions.release_date IS 'The date the deposition was released'; | ||
COMMENT ON COLUMN public.depositions.last_modified_date IS 'The date the deposition was last modified'; | ||
COMMENT ON COLUMN public.depositions.deposition_date IS 'The date the deposition was deposited'; | ||
COMMENT ON COLUMN public.depositions.related_database_entries IS 'The related database entries to this deposition'; | ||
COMMENT ON COLUMN public.depositions.deposition_publications IS 'The publications related to this deposition'; | ||
COMMENT ON COLUMN public.depositions.deposition_types IS 'The types of data submitted as a part of this deposition'; | ||
COMMENT ON COLUMN public.depositions.s3_prefix IS 'The S3 public bucket path where data about this deposition is contained'; | ||
COMMENT ON COLUMN public.depositions.https_prefix IS 'The https directory path where data about this deposition is contained'; | ||
|
||
CREATE INDEX "depositions_type" on "public"."depositions" using btree ("deposition_types"); | ||
|
||
CREATE TABLE "public"."deposition_authors" ( | ||
"id" serial NOT NULL, | ||
"name" varchar NOT NULL, | ||
"orcid" varchar, | ||
"corresponding_author_status" boolean DEFAULT false, | ||
"email" varchar, | ||
"affiliation_name" varchar, | ||
"affiliation_address" varchar, | ||
"affiliation_identifier" varchar, | ||
"deposition_id" integer NOT NULL, | ||
"primary_author_status" boolean DEFAULT false, | ||
"author_list_order" integer NOT NULL, | ||
PRIMARY KEY ("id") , | ||
FOREIGN KEY ("deposition_id") REFERENCES "public"."depositions"("id") ON UPDATE restrict ON DELETE restrict, | ||
UNIQUE ("id") | ||
); | ||
|
||
COMMENT ON TABLE "public"."deposition_authors" IS E'Authors for a deposition'; | ||
COMMENT ON COLUMN public.deposition_authors.id IS 'Numeric identifier for this deposition author (this may change!)'; | ||
COMMENT ON COLUMN public.deposition_authors.author_list_order IS 'The order in which the author appears in the publication'; | ||
COMMENT ON COLUMN public.deposition_authors.deposition_id IS 'Reference to the deposition this author contributed to'; | ||
COMMENT ON COLUMN public.deposition_authors.name IS 'Full name of a deposition author (e.g. Jane Doe).'; | ||
COMMENT ON COLUMN public.deposition_authors.orcid IS 'A unique, persistent identifier for researchers, provided by ORCID.'; | ||
COMMENT ON COLUMN public.deposition_authors.corresponding_author_status IS 'Indicates whether an author is the corresponding author'; | ||
COMMENT ON COLUMN public.deposition_authors.primary_author_status IS 'Indicates whether an author is the main person creating the deposition'; | ||
COMMENT ON COLUMN public.deposition_authors.email IS 'Email address for this author'; | ||
COMMENT ON COLUMN public.deposition_authors.affiliation_name IS 'Name of the institution an author is affiliated with.'; | ||
COMMENT ON COLUMN public.deposition_authors.affiliation_address IS 'Address of the institution an author is affiliated with.'; | ||
COMMENT ON COLUMN public.deposition_authors.affiliation_identifier IS 'A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).'; | ||
|
||
ALTER TABLE "public"."datasets" ADD COLUMN "deposition_id" INTEGER NULL; | ||
CREATE INDEX "dataset_deposition_id" on "public"."datasets" using btree ("deposition_id"); | ||
|
||
COMMENT ON COLUMN public.datasets.deposition_id IS 'Reference to the deposition this dataset is associated with'; | ||
|
||
ALTER TABLE "public"."tiltseries" ADD COLUMN "deposition_id" INTEGER NULL; | ||
CREATE INDEX "tiltseries_deposition_id" ON "public"."tiltseries" USING btree ("deposition_id"); | ||
|
||
COMMENT ON COLUMN public.tiltseries.deposition_id IS 'Reference to the deposition this tiltseries is associated with'; |