Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
middleware
/
cyborg
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
64aef5dc
authored
Feb 19, 2019
by
Zuul
Committed by
Gerrit Code Review
Feb 19, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Modify "extended_accelerator_requests" table "project_id" field."
parents
ebe865a5
e9152d7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
cyborg/db/sqlalchemy/alembic/versions/ede4e3f1a232_new_db_schema.py
+3
-1
cyborg/db/sqlalchemy/models.py
+4
-3
No files found.
cyborg/db/sqlalchemy/alembic/versions/ede4e3f1a232_new_db_schema.py
View file @
64aef5dc
...
...
@@ -143,7 +143,9 @@ def upgrade():
sa
.
Column
(
'updated_at'
,
sa
.
DateTime
(),
nullable
=
True
),
sa
.
Column
(
'id'
,
sa
.
Integer
(),
nullable
=
False
),
sa
.
Column
(
'uuid'
,
sa
.
String
(
length
=
36
),
nullable
=
False
,
unique
=
True
),
sa
.
Column
(
'project_id'
,
sa
.
String
(
length
=
255
),
nullable
=
False
),
# NOTICE: we don't have project related constraints in Stein Release,
# set nullable=True but keep this field for further expansion.
sa
.
Column
(
'project_id'
,
sa
.
String
(
length
=
255
),
nullable
=
True
),
sa
.
Column
(
'state'
,
state
,
nullable
=
False
,
default
=
'Initial'
),
sa
.
Column
(
'device_profile_id'
,
sa
.
Integer
(),
sa
.
ForeignKey
(
'device_profiles.id'
,
ondelete
=
"RESTRICT"
),
...
...
cyborg/db/sqlalchemy/models.py
View file @
64aef5dc
...
...
@@ -171,8 +171,9 @@ class DeviceProfile(Base):
profile_json
=
Column
(
Text
,
nullable
=
False
)
class
ExtendedAcceleratorRequest
(
Base
):
"""Represents extended nova requests for attach related operations."""
class
ExtArq
(
Base
):
"""ExtArq is the abbreviation of ExtendedAcceleratorRequest, it represents
extended nova requests for attach related operations."""
__tablename__
=
'extended_accelerator_requests'
__table_args__
=
(
...
...
@@ -187,7 +188,7 @@ class ExtendedAcceleratorRequest(Base):
id
=
Column
(
Integer
,
primary_key
=
True
)
uuid
=
Column
(
String
(
36
),
nullable
=
False
,
unique
=
True
)
project_id
=
Column
(
String
(
255
),
nullable
=
Fals
e
)
project_id
=
Column
(
String
(
255
),
nullable
=
Tru
e
)
state
=
Column
(
Enum
(
'Initial'
,
'Bound'
,
'BindFailed'
,
name
=
'state'
),
nullable
=
False
)
device_profile_id
=
Column
(
Integer
,
ForeignKey
(
'device_profiles.id'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment