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
ebba2913
Commit
ebba2913
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Add migration script for corpora table.
parent
525d53a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
migrations/versions/60d474dea68f_add_corpora_table.py
+35
-0
35 additions, 0 deletions
migrations/versions/60d474dea68f_add_corpora_table.py
with
35 additions
and
0 deletions
migrations/versions/60d474dea68f_add_corpora_table.py
0 → 100644
+
35
−
0
View file @
ebba2913
"""
Add corpora table
Revision ID: 60d474dea68f
Revises: 717796966c8c
Create Date: 2019-08-06 12:03:30.639380
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
'
60d474dea68f
'
down_revision
=
'
717796966c8c
'
branch_labels
=
None
depends_on
=
None
def
upgrade
():
# ### commands auto generated by Alembic - please adjust! ###
op
.
create_table
(
'
corpora
'
,
sa
.
Column
(
'
id
'
,
sa
.
Integer
(),
nullable
=
False
),
sa
.
Column
(
'
description
'
,
sa
.
String
(
length
=
64
),
nullable
=
True
),
sa
.
Column
(
'
title
'
,
sa
.
String
(
length
=
32
),
nullable
=
True
),
sa
.
Column
(
'
user_id
'
,
sa
.
Integer
(),
nullable
=
True
),
sa
.
ForeignKeyConstraint
([
'
user_id
'
],
[
'
users.id
'
],
),
sa
.
PrimaryKeyConstraint
(
'
id
'
)
)
# ### end Alembic commands ###
def
downgrade
():
# ### commands auto generated by Alembic - please adjust! ###
op
.
drop_table
(
'
corpora
'
)
# ### end Alembic commands ###
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