Removed unneeded model constraint

This commit is contained in:
2014-11-13 19:18:12 +01:00
parent 45b6afc30c
commit c4b07d2962
2 changed files with 2 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class Project(db.Model):
class ProjectSetting(db.Model):
id = db.Column(db.Integer, primary_key=True)
project_id = db.Column(db.Integer(), db.ForeignKey('project.id'), nullable=False)
name = db.Column(db.String(256), unique=True, nullable=False)
name = db.Column(db.String(256), nullable=False)
description = db.Column(db.Text)
value = db.Column(db.String(100), nullable=False)
data_type = db.Column(db.String(128), nullable=False)

View File

@@ -24,8 +24,7 @@ def upgrade():
sa.Column('value', sa.String(length=100), nullable=False),
sa.Column('data_type', sa.String(length=128), nullable=False),
sa.ForeignKeyConstraint(['project_id'], ['project.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('name')
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###