Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
644369d1
Commit
644369d1
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Add compare_type=True to Migrate constructor
parent
13a6ef95
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/migrations/versions/9d21b228d353_.py
+50
-0
50 additions, 0 deletions
web/migrations/versions/9d21b228d353_.py
web/nopaque.py
+1
-1
1 addition, 1 deletion
web/nopaque.py
with
51 additions
and
1 deletion
web/migrations/versions/9d21b228d353_.py
0 → 100644
+
50
−
0
View file @
644369d1
"""
empty message
Revision ID: 9d21b228d353
Revises: 33ec4d09b4ca
Create Date: 2020-07-15 08:58:59.062442
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
'
9d21b228d353
'
down_revision
=
'
33ec4d09b4ca
'
branch_labels
=
None
depends_on
=
None
def
upgrade
():
# ### commands auto generated by Alembic - please adjust! ###
op
.
alter_column
(
'
corpus_files
'
,
'
author
'
,
existing_type
=
sa
.
VARCHAR
(
length
=
64
),
type_
=
sa
.
String
(
length
=
255
),
existing_nullable
=
True
)
op
.
alter_column
(
'
corpus_files
'
,
'
title
'
,
existing_type
=
sa
.
VARCHAR
(
length
=
64
),
type_
=
sa
.
String
(
length
=
255
),
existing_nullable
=
True
)
op
.
alter_column
(
'
roles
'
,
'
permissions
'
,
existing_type
=
sa
.
INTEGER
(),
type_
=
sa
.
BigInteger
(),
existing_nullable
=
True
)
# ### end Alembic commands ###
def
downgrade
():
# ### commands auto generated by Alembic - please adjust! ###
op
.
alter_column
(
'
roles
'
,
'
permissions
'
,
existing_type
=
sa
.
BigInteger
(),
type_
=
sa
.
INTEGER
(),
existing_nullable
=
True
)
op
.
alter_column
(
'
corpus_files
'
,
'
title
'
,
existing_type
=
sa
.
String
(
length
=
255
),
type_
=
sa
.
VARCHAR
(
length
=
64
),
existing_nullable
=
True
)
op
.
alter_column
(
'
corpus_files
'
,
'
author
'
,
existing_type
=
sa
.
String
(
length
=
255
),
type_
=
sa
.
VARCHAR
(
length
=
64
),
existing_nullable
=
True
)
# ### end Alembic commands ###
This diff is collapsed.
Click to expand it.
web/nopaque.py
+
1
−
1
View file @
644369d1
...
...
@@ -8,7 +8,7 @@ from flask_migrate import Migrate, upgrade
import
os
app
=
create_app
(
os
.
getenv
(
'
FLASK_CONFIG
'
)
or
'
default
'
)
migrate
=
Migrate
(
app
,
db
)
migrate
=
Migrate
(
app
,
db
,
compare_type
=
True
)
@app.shell_context_processor
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment