1
0
forked from ScoDoc/ScoDoc

ajout colonne date_envoi

This commit is contained in:
Arthur ZHU 2021-12-24 10:46:36 +01:00
parent 3b28056278
commit 5024658a87
2 changed files with 3 additions and 1 deletions

View File

@ -57,4 +57,5 @@ class EntrepriseEnvoiOffre(db.Model):
__tablename__ = "entreprise_envoi_offre" __tablename__ = "entreprise_envoi_offre"
id = db.Column(db.Integer, primary_key=True) id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey("user.id")) user_id = db.Column(db.Integer, db.ForeignKey("user.id"))
offre_id = db.Column(db.Integer, db.ForeignKey("entreprise_offre.id")) offre_id = db.Column(db.Integer, db.ForeignKey("entreprise_offre.id"))
date_envoi = db.Column(db.DateTime(timezone=True), server_default=db.func.now())

View File

@ -57,6 +57,7 @@ def upgrade():
sa.Column('id', sa.Integer(), nullable=False), sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('offre_id', sa.Integer(), nullable=True), sa.Column('offre_id', sa.Integer(), nullable=True),
sa.Column('date_envoi', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
sa.ForeignKeyConstraint(['offre_id'], ['entreprise_offre.id'], ), sa.ForeignKeyConstraint(['offre_id'], ['entreprise_offre.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ), sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id') sa.PrimaryKeyConstraint('id')