adds device handling functionality from the browser
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 3b829a27bc337
|
||||
Revises: 1e8205594ac1
|
||||
Create Date: 2020-05-27 19:30:54.384047
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3b829a27bc337'
|
||||
down_revision = '1e8205594ac1'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column('User', 'google_credentials', existing_type=sa.Relationship(), new_column_name='google_token')
|
||||
|
||||
def downgrade():
|
||||
op.alter_column('User', 'google_token', existing_type=sa.Relationship(), new_column_name='google_credentials')
|
28
database/migrations/versions/e5ef5e4a807b_.py
Normal file
28
database/migrations/versions/e5ef5e4a807b_.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: e5ef5e4a807b
|
||||
Revises: 1e8205594ac1
|
||||
Create Date: 2020-05-28 09:01:09.268270
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'e5ef5e4a807b'
|
||||
down_revision = '1e8205594ac1'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('device', sa.Column('connection', sa.Boolean(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('device', 'connection')
|
||||
# ### end Alembic commands ###
|
@ -60,6 +60,7 @@ class Device(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
|
||||
deviceName = db.Column(db.String(64), unique=True)
|
||||
connection = db.Column(db.Boolean)
|
||||
|
||||
class Calendar(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
|
Reference in New Issue
Block a user