index on order_id

This commit is contained in:
2023-11-25 02:39:29 +03:00
parent 6683576a70
commit 448ba351a7

View File

@@ -23,7 +23,7 @@ class Assembly(db.Model):
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
user = db.relationship('User', backref='assemblies')
order_id = db.Column(db.Integer, nullable=False, comment='ID заказа в базе данных')
order_id = db.Column(db.Integer, nullable=False, comment='ID заказа в базе данных', index=True)
is_active = db.Column(db.Boolean, nullable=False, comment='Активная ли сборка')
state = db.Column(db.Integer, nullable=False, comment='Состояние сборки')