This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Database changes for project-level admin
Summary: Added a new column, project_permissions, to the User model to keep track of projects that users will have access to. Test Plan: the local dev environment worked fine Reviewers: anupc Reviewed By: anupc Subscribers: changesbot, kylec Differential Revision: https://tails.corp.dropbox.com/D221719
- Loading branch information
Naphat Sanguansin
committed
Aug 19, 2016
1 parent
5ec4000
commit 6dd9771
Showing
2 changed files
with
31 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
migrations/versions/460741ff1212_add_project_permissions_column_to_user.py
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,23 @@ | ||
"""add project_permissions column to user | ||
Revision ID: 460741ff1212 | ||
Revises: 3b94584c761e | ||
Create Date: 2016-08-19 09:26:10.731482 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '460741ff1212' | ||
down_revision = '3b94584c761e' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
|
||
def upgrade(): | ||
op.add_column('user', sa.Column('project_permissions', postgresql.ARRAY(sa.String(length=256)), nullable=False, default=[])) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('user', 'project_permissions') |