diff --git a/app/entreprises/models.py b/app/entreprises/models.py index b4ac1a4b3d..ec963be201 100644 --- a/app/entreprises/models.py +++ b/app/entreprises/models.py @@ -57,4 +57,5 @@ class EntrepriseEnvoiOffre(db.Model): __tablename__ = "entreprise_envoi_offre" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey("user.id")) - offre_id = db.Column(db.Integer, db.ForeignKey("entreprise_offre.id")) \ No newline at end of file + offre_id = db.Column(db.Integer, db.ForeignKey("entreprise_offre.id")) + date_envoi = db.Column(db.DateTime(timezone=True), server_default=db.func.now()) \ No newline at end of file diff --git a/migrations/versions/f3b62d64efa3_creation_tables_relations_entreprises.py b/migrations/versions/f3b62d64efa3_creation_tables_relations_entreprises.py index cc524777ba..7d629e280d 100644 --- a/migrations/versions/f3b62d64efa3_creation_tables_relations_entreprises.py +++ b/migrations/versions/f3b62d64efa3_creation_tables_relations_entreprises.py @@ -57,6 +57,7 @@ def upgrade(): sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_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(['user_id'], ['user.id'], ), sa.PrimaryKeyConstraint('id')