-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from Caleydo/release-2.0.1
Release 2.0.1
- Loading branch information
Showing
7 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
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
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 @@ | ||
Generic single-database configuration. |
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,3 @@ | ||
import tdp_core.dbmigration_env # NOQA | ||
|
||
tdp_core.dbmigration_env.run_migrations_online() |
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,24 @@ | ||
"""${message} | ||
|
||
Revision ID: ${up_revision} | ||
Revises: ${down_revision | comma,n} | ||
Create Date: ${create_date} | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
${imports if imports else ""} | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = ${repr(up_revision)} | ||
down_revision = ${repr(down_revision)} | ||
branch_labels = ${repr(branch_labels)} | ||
depends_on = ${repr(depends_on)} | ||
|
||
|
||
def upgrade(): | ||
${upgrades if upgrades else "pass"} | ||
|
||
|
||
def downgrade(): | ||
${downgrades if downgrades else "pass"} |
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,46 @@ | ||
"""Create cohort schema, sequence and table | ||
Revision ID: ddd776aa28c3 | ||
Revises: | ||
Create Date: 2022-04-14 11:58:27.444788 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'ddd776aa28c3' | ||
down_revision = None | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
connection = op.get_bind() | ||
for cmd in [""" | ||
CREATE SCHEMA IF NOT EXISTS cohort; | ||
CREATE SEQUENCE cohort.cohort_id_seq | ||
INCREMENT 1 | ||
START 1 | ||
MINVALUE 1 | ||
MAXVALUE 2147483647 | ||
CACHE 1; | ||
""", """ | ||
CREATE TABLE cohort.cohort | ||
( | ||
id integer NOT NULL DEFAULT nextval('cohort.cohort_id_seq'::regclass), | ||
name character varying COLLATE pg_catalog."default" NOT NULL, | ||
is_initial integer NOT NULL, | ||
previous_cohort integer, | ||
entity_database character varying COLLATE pg_catalog."default" NOT NULL, | ||
entity_schema character varying COLLATE pg_catalog."default" NOT NULL, | ||
entity_table character varying COLLATE pg_catalog."default" NOT NULL, | ||
statement character varying COLLATE pg_catalog."default", | ||
CONSTRAINT cohort_pkey PRIMARY KEY (id) | ||
); | ||
"""]: | ||
connection.execute(cmd) | ||
|
||
|
||
def downgrade(): | ||
connection = op.get_bind() | ||
connection.execute("DROP SCHEMA cohort CASCADE;") |
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
-e git+https://github.com/phovea/phovea_server.git@develop#egg=phovea_server | ||
-e git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core | ||
phovea_server>=9.0.0,<10.0.0 | ||
tdp_core>=14.0.2,<15.0.0 |