table + correctif style
This commit is contained in:
parent
ead81f7615
commit
d19bc3391f
@ -137,3 +137,10 @@ class EntrepriseEnvoiOffreEtudiant(db.Model):
|
|||||||
receiver_id = db.Column(db.Integer, db.ForeignKey("identite.id"))
|
receiver_id = db.Column(db.Integer, db.ForeignKey("identite.id"))
|
||||||
offre_id = db.Column(db.Integer, db.ForeignKey("are_entreprise_offre.id"))
|
offre_id = db.Column(db.Integer, db.ForeignKey("are_entreprise_offre.id"))
|
||||||
date_envoi = db.Column(db.DateTime(timezone=True), server_default=db.func.now())
|
date_envoi = db.Column(db.DateTime(timezone=True), server_default=db.func.now())
|
||||||
|
|
||||||
|
|
||||||
|
class EntrepriseOffreDepartement(db.Model):
|
||||||
|
__tablename__ = "are_entreprise_offre_departement"
|
||||||
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
|
offre_id = db.Column(db.Integer, db.ForeignKey("are_entreprise_offre.id"))
|
||||||
|
dept_id = db.Column(db.Integer, db.ForeignKey("departement.id"))
|
||||||
|
@ -1,24 +1,29 @@
|
|||||||
.nav-entreprise>ul {
|
.nav-entreprise>ul {
|
||||||
margin: 0;
|
padding-left: 0;
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-entreprise li{
|
.nav-entreprise li{
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-entreprise>ul>li>a {
|
.nav-entreprise>ul>li>a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-entreprise>ul>li>a:hover {
|
.nav-entreprise>ul>li>a:hover {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.boutons .btn {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-inverse {
|
.btn-inverse {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-shadow: 0 -1px 0 rgb(0 0 0 / 25%);
|
text-shadow: 0 -1px 0 rgb(0 0 0 / 25%);
|
||||||
@ -36,6 +41,11 @@
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.offre .btn {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.parent-btn {
|
.parent-btn {
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
||||||
<div class="container">
|
<div class="container boutons">
|
||||||
{% if contacts %}
|
{% if contacts %}
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts') }}">Exporter la liste des contacts</a>
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts') }}">Exporter la liste des contacts</a>
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts_bis') }}">Exporter la liste des contacts avec leur entreprise</a>
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts_bis') }}">Exporter la liste des contacts avec leur entreprise</a>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Liste des contacts</h1>
|
<h1>Liste des contacts</h1>
|
||||||
{% if contacts %}
|
{% if contacts.items %}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-hover">
|
<table class="table table-bordered table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
@ -50,33 +50,32 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<a href="{{ url_for('entreprises.contacts', page=contacts.prev_num) }}" class="btn btn-default {% if contacts.page == 1 %}disabled{% endif %}">
|
|
||||||
«
|
|
||||||
</a>
|
|
||||||
{% for page_num in contacts.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
|
||||||
{% if page_num %}
|
|
||||||
{% if contacts.page == page_num %}
|
|
||||||
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
...
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ url_for('entreprises.contacts', page=contacts.next_num) }}" class="btn btn-default {% if contacts.page == contacts.pages %}disabled{% endif %}">
|
|
||||||
»
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-center">
|
|
||||||
Page {{ contacts.page }} sur {{ contacts.pages }}
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<div>Aucun contact présent dans la base</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="{{ url_for('entreprises.contacts', page=contacts.prev_num) }}" class="btn btn-default {% if contacts.page == 1 %}disabled{% endif %}">
|
||||||
|
«
|
||||||
|
</a>
|
||||||
|
{% for page_num in contacts.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
||||||
|
{% if page_num %}
|
||||||
|
{% if contacts.page == page_num %}
|
||||||
|
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
...
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{{ url_for('entreprises.contacts', page=contacts.next_num) }}" class="btn btn-default {% if contacts.page == contacts.pages %}disabled{% endif %}">
|
||||||
|
»
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p class="text-center">
|
||||||
|
Page {{ contacts.page }} sur {{ contacts.pages }}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<div>Aucun contact présent dans la base</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container boutons">
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.add_entreprise') }}">Ajouter une entreprise</a>
|
<a class="btn btn-default" href="{{ url_for('entreprises.add_entreprise') }}">Ajouter une entreprise</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -66,34 +66,33 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<a href="{{ url_for('entreprises.index', page=entreprises.prev_num) }}" class="btn btn-default {% if entreprises.page == 1 %}disabled{% endif %}">
|
|
||||||
«
|
|
||||||
</a>
|
|
||||||
{% for page_num in entreprises.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
|
||||||
{% if page_num %}
|
|
||||||
{% if entreprises.page == page_num %}
|
|
||||||
<a href="{{ url_for('entreprises.index', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for('entreprises.index', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
...
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ url_for('entreprises.index', page=entreprises.next_num) }}" class="btn btn-default {% if entreprises.page == entreprises.pages %}disabled{% endif %}">
|
|
||||||
»
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-center">
|
|
||||||
Page {{ entreprises.page }} sur {{ entreprises.pages }}
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<div>Aucune entreprise présent dans la base</div>
|
|
||||||
<br>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="{{ url_for('entreprises.index', page=entreprises.prev_num) }}" class="btn btn-default {% if entreprises.page == 1 %}disabled{% endif %}">
|
||||||
|
«
|
||||||
|
</a>
|
||||||
|
{% for page_num in entreprises.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
||||||
|
{% if page_num %}
|
||||||
|
{% if entreprises.page == page_num %}
|
||||||
|
<a href="{{ url_for('entreprises.index', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ url_for('entreprises.index', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
...
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{{ url_for('entreprises.index', page=entreprises.next_num) }}" class="btn btn-default {% if entreprises.page == entreprises.pages %}disabled{% endif %}">
|
||||||
|
»
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center">
|
||||||
|
Page {{ entreprises.page }} sur {{ entreprises.pages }}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<div>Aucune entreprise présent dans la base</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -5,7 +5,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Offres expirées - {{ entreprise.nom }}</h1>
|
<h1>Offres expirées - {{ entreprise.nom }}</h1>
|
||||||
{% if offres_expirees %}
|
{% if offres_expirees %}
|
||||||
{% for offre in offres_expirees%}
|
{% for offre in offres_expirees %}
|
||||||
{% include 'entreprises/_offre.html' %}
|
{% include 'entreprises/_offre.html' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -0,0 +1,176 @@
|
|||||||
|
"""tables application relations entreprises
|
||||||
|
|
||||||
|
Revision ID: e63f6a9dcc75
|
||||||
|
Revises: c95d5a3bf0de
|
||||||
|
Create Date: 2022-02-03 15:47:02.445248
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'e63f6a9dcc75'
|
||||||
|
down_revision = 'c95d5a3bf0de'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_table('are_entreprise_log',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('date', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
|
||||||
|
sa.Column('authenticated_user', sa.Text(), nullable=True),
|
||||||
|
sa.Column('object', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('text', sa.Text(), nullable=True),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprises',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('siret', sa.Text(), nullable=True),
|
||||||
|
sa.Column('nom', sa.Text(), nullable=True),
|
||||||
|
sa.Column('adresse', sa.Text(), nullable=True),
|
||||||
|
sa.Column('codepostal', sa.Text(), nullable=True),
|
||||||
|
sa.Column('ville', sa.Text(), nullable=True),
|
||||||
|
sa.Column('pays', sa.Text(), nullable=True),
|
||||||
|
sa.Column('visible', sa.Boolean(), nullable=True),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_contact',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('entreprise_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('nom', sa.Text(), nullable=True),
|
||||||
|
sa.Column('prenom', sa.Text(), nullable=True),
|
||||||
|
sa.Column('telephone', sa.Text(), nullable=True),
|
||||||
|
sa.Column('mail', sa.Text(), nullable=True),
|
||||||
|
sa.Column('poste', sa.Text(), nullable=True),
|
||||||
|
sa.Column('service', sa.Text(), nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_id'], ['are_entreprises.id'], ondelete='cascade'),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_etudiant',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('entreprise_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('etudid', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('type_offre', sa.Text(), nullable=True),
|
||||||
|
sa.Column('date_debut', sa.Date(), nullable=True),
|
||||||
|
sa.Column('date_fin', sa.Date(), nullable=True),
|
||||||
|
sa.Column('formation_text', sa.Text(), nullable=True),
|
||||||
|
sa.Column('formation_scodoc', sa.Integer(), nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_id'], ['are_entreprises.id'], ),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_offre',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('entreprise_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('date_ajout', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
|
||||||
|
sa.Column('intitule', sa.Text(), nullable=True),
|
||||||
|
sa.Column('description', sa.Text(), nullable=True),
|
||||||
|
sa.Column('type_offre', sa.Text(), nullable=True),
|
||||||
|
sa.Column('missions', sa.Text(), nullable=True),
|
||||||
|
sa.Column('duree', sa.Text(), nullable=True),
|
||||||
|
sa.Column('expiration_date', sa.Date(), nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_id'], ['are_entreprises.id'], ondelete='cascade'),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_envoi_offre',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('sender_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('receiver_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'], ['are_entreprise_offre.id'], ),
|
||||||
|
sa.ForeignKeyConstraint(['receiver_id'], ['user.id'], ),
|
||||||
|
sa.ForeignKeyConstraint(['sender_id'], ['user.id'], ),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_envoi_offre_etudiant',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('sender_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('receiver_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'], ['are_entreprise_offre.id'], ),
|
||||||
|
sa.ForeignKeyConstraint(['receiver_id'], ['identite.id'], ),
|
||||||
|
sa.ForeignKeyConstraint(['sender_id'], ['user.id'], ),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.create_table('are_entreprise_offre_departement',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('offre_id', sa.Integer(), nullable=True),
|
||||||
|
sa.Column('dept_id', sa.Integer(), nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['dept_id'], ['departement.id'], ),
|
||||||
|
sa.ForeignKeyConstraint(['offre_id'], ['are_entreprise_offre.id'], ),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
op.drop_table('entreprise_contact')
|
||||||
|
op.drop_table('entreprise_correspondant')
|
||||||
|
op.drop_index('ix_entreprises_dept_id', table_name='entreprises')
|
||||||
|
op.drop_table('entreprises')
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_table('entreprises',
|
||||||
|
sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('entreprises_id_seq'::regclass)"), autoincrement=True, nullable=False),
|
||||||
|
sa.Column('nom', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('adresse', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('ville', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('codepostal', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('pays', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('localisation', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('dept_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('date_creation', postgresql.TIMESTAMP(timezone=True), server_default=sa.text('now()'), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('secteur', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('privee', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('plus10salaries', sa.BOOLEAN(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('contact_origine', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('note', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('qualite_relation', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['dept_id'], ['departement.id'], name='entreprises_dept_id_fkey'),
|
||||||
|
sa.PrimaryKeyConstraint('id', name='entreprises_pkey'),
|
||||||
|
postgresql_ignore_search_path=False
|
||||||
|
)
|
||||||
|
op.create_index('ix_entreprises_dept_id', 'entreprises', ['dept_id'], unique=False)
|
||||||
|
op.create_table('entreprise_correspondant',
|
||||||
|
sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('entreprise_correspondant_id_seq'::regclass)"), autoincrement=True, nullable=False),
|
||||||
|
sa.Column('entreprise_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('nom', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('prenom', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('civilite', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('fonction', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('phone1', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('phone2', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('mobile', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('mail1', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('mail2', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('fax', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('note', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_id'], ['entreprises.id'], name='entreprise_correspondant_entreprise_id_fkey'),
|
||||||
|
sa.PrimaryKeyConstraint('id', name='entreprise_correspondant_pkey'),
|
||||||
|
postgresql_ignore_search_path=False
|
||||||
|
)
|
||||||
|
op.create_table('entreprise_contact',
|
||||||
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
||||||
|
sa.Column('entreprise_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('entreprise_corresp_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('etudid', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('type_contact', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('date', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('enseignant', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.Column('description', sa.TEXT(), autoincrement=False, nullable=True),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_corresp_id'], ['entreprise_correspondant.id'], name='entreprise_contact_entreprise_corresp_id_fkey'),
|
||||||
|
sa.ForeignKeyConstraint(['entreprise_id'], ['entreprises.id'], name='entreprise_contact_entreprise_id_fkey'),
|
||||||
|
sa.PrimaryKeyConstraint('id', name='entreprise_contact_pkey')
|
||||||
|
)
|
||||||
|
op.drop_table('are_entreprise_offre_departement')
|
||||||
|
op.drop_table('are_entreprise_envoi_offre_etudiant')
|
||||||
|
op.drop_table('are_entreprise_envoi_offre')
|
||||||
|
op.drop_table('are_entreprise_offre')
|
||||||
|
op.drop_table('are_entreprise_etudiant')
|
||||||
|
op.drop_table('are_entreprise_contact')
|
||||||
|
op.drop_table('are_entreprises')
|
||||||
|
op.drop_table('are_entreprise_log')
|
||||||
|
# ### end Alembic commands ###
|
@ -1,254 +0,0 @@
|
|||||||
"""tables application relations entreprises
|
|
||||||
|
|
||||||
Revision ID: fa4d3f05e4f0
|
|
||||||
Revises: f40fbaf5831c
|
|
||||||
Create Date: 2022-01-25 17:33:28.546610
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from sqlalchemy.dialects import postgresql
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = "fa4d3f05e4f0"
|
|
||||||
down_revision = "f40fbaf5831c"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_log",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column(
|
|
||||||
"date",
|
|
||||||
sa.DateTime(timezone=True),
|
|
||||||
server_default=sa.text("now()"),
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
sa.Column("authenticated_user", sa.Text(), nullable=True),
|
|
||||||
sa.Column("object", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("text", sa.Text(), nullable=True),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprises",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("siret", sa.Text(), nullable=True),
|
|
||||||
sa.Column("nom", sa.Text(), nullable=True),
|
|
||||||
sa.Column("adresse", sa.Text(), nullable=True),
|
|
||||||
sa.Column("codepostal", sa.Text(), nullable=True),
|
|
||||||
sa.Column("ville", sa.Text(), nullable=True),
|
|
||||||
sa.Column("pays", sa.Text(), nullable=True),
|
|
||||||
sa.Column("visible", sa.Boolean(), nullable=True),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_contact",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("entreprise_id", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("nom", sa.Text(), nullable=True),
|
|
||||||
sa.Column("prenom", sa.Text(), nullable=True),
|
|
||||||
sa.Column("telephone", sa.Text(), nullable=True),
|
|
||||||
sa.Column("mail", sa.Text(), nullable=True),
|
|
||||||
sa.Column("poste", sa.Text(), nullable=True),
|
|
||||||
sa.Column("service", sa.Text(), nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_id"], ["are_entreprises.id"], ondelete="cascade"
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_etudiant",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("entreprise_id", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("etudid", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("type_offre", sa.Text(), nullable=True),
|
|
||||||
sa.Column("date_debut", sa.Date(), nullable=True),
|
|
||||||
sa.Column("date_fin", sa.Date(), nullable=True),
|
|
||||||
sa.Column("formation_text", sa.Text(), nullable=True),
|
|
||||||
sa.Column("formation_scodoc", sa.Integer(), nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_id"],
|
|
||||||
["are_entreprises.id"],
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_offre",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("entreprise_id", sa.Integer(), nullable=True),
|
|
||||||
sa.Column(
|
|
||||||
"date_ajout",
|
|
||||||
sa.DateTime(timezone=True),
|
|
||||||
server_default=sa.text("now()"),
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
sa.Column("intitule", sa.Text(), nullable=True),
|
|
||||||
sa.Column("description", sa.Text(), nullable=True),
|
|
||||||
sa.Column("type_offre", sa.Text(), nullable=True),
|
|
||||||
sa.Column("missions", sa.Text(), nullable=True),
|
|
||||||
sa.Column("duree", sa.Text(), nullable=True),
|
|
||||||
sa.Column("expiration_date", sa.Date(), nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_id"], ["are_entreprises.id"], ondelete="cascade"
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_envoi_offre",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("sender_id", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("receiver_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"],
|
|
||||||
["are_entreprise_offre.id"],
|
|
||||||
),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["receiver_id"],
|
|
||||||
["user.id"],
|
|
||||||
),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["sender_id"],
|
|
||||||
["user.id"],
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"are_entreprise_envoi_offre_etudiant",
|
|
||||||
sa.Column("id", sa.Integer(), nullable=False),
|
|
||||||
sa.Column("sender_id", sa.Integer(), nullable=True),
|
|
||||||
sa.Column("receiver_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"],
|
|
||||||
["are_entreprise_offre.id"],
|
|
||||||
),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["receiver_id"],
|
|
||||||
["identite.id"],
|
|
||||||
),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["sender_id"],
|
|
||||||
["user.id"],
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id"),
|
|
||||||
)
|
|
||||||
op.drop_table("entreprise_contact")
|
|
||||||
op.drop_index("ix_entreprises_dept_id", table_name="entreprises")
|
|
||||||
op.drop_table("entreprise_correspondant")
|
|
||||||
op.drop_table("entreprises")
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
op.create_table(
|
|
||||||
"entreprises",
|
|
||||||
sa.Column(
|
|
||||||
"id",
|
|
||||||
sa.INTEGER(),
|
|
||||||
server_default=sa.text("nextval('entreprises_id_seq'::regclass)"),
|
|
||||||
autoincrement=True,
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.Column("nom", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("adresse", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("ville", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("codepostal", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("pays", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("localisation", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("dept_id", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column(
|
|
||||||
"date_creation",
|
|
||||||
postgresql.TIMESTAMP(timezone=True),
|
|
||||||
server_default=sa.text("now()"),
|
|
||||||
autoincrement=False,
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
sa.Column("secteur", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("privee", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("plus10salaries", sa.BOOLEAN(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("contact_origine", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("note", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("qualite_relation", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["dept_id"], ["departement.id"], name="entreprises_dept_id_fkey"
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id", name="entreprises_pkey"),
|
|
||||||
postgresql_ignore_search_path=False,
|
|
||||||
)
|
|
||||||
op.create_index("ix_entreprises_dept_id", "entreprises", ["dept_id"], unique=False)
|
|
||||||
op.create_table(
|
|
||||||
"entreprise_correspondant",
|
|
||||||
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
|
|
||||||
sa.Column("entreprise_id", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("nom", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("prenom", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("civilite", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("fonction", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("phone1", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("phone2", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("mobile", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("mail1", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("mail2", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("fax", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("note", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_id"],
|
|
||||||
["entreprises.id"],
|
|
||||||
name="entreprise_correspondant_entreprise_id_fkey",
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id", name="entreprise_correspondant_pkey"),
|
|
||||||
)
|
|
||||||
op.create_table(
|
|
||||||
"entreprise_contact",
|
|
||||||
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
|
|
||||||
sa.Column("entreprise_id", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column(
|
|
||||||
"entreprise_corresp_id", sa.INTEGER(), autoincrement=False, nullable=True
|
|
||||||
),
|
|
||||||
sa.Column("etudid", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("type_contact", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column(
|
|
||||||
"date",
|
|
||||||
postgresql.TIMESTAMP(timezone=True),
|
|
||||||
autoincrement=False,
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
sa.Column("enseignant", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.Column("description", sa.TEXT(), autoincrement=False, nullable=True),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_corresp_id"],
|
|
||||||
["entreprise_correspondant.id"],
|
|
||||||
name="entreprise_contact_entreprise_corresp_id_fkey",
|
|
||||||
),
|
|
||||||
sa.ForeignKeyConstraint(
|
|
||||||
["entreprise_id"],
|
|
||||||
["entreprises.id"],
|
|
||||||
name="entreprise_contact_entreprise_id_fkey",
|
|
||||||
),
|
|
||||||
sa.PrimaryKeyConstraint("id", name="entreprise_contact_pkey"),
|
|
||||||
)
|
|
||||||
op.drop_table("are_entreprise_envoi_offre_etudiant")
|
|
||||||
op.drop_table("are_entreprise_envoi_offre")
|
|
||||||
op.drop_table("are_entreprise_offre")
|
|
||||||
op.drop_table("are_entreprise_etudiant")
|
|
||||||
op.drop_table("are_entreprise_contact")
|
|
||||||
op.drop_table("are_entreprises")
|
|
||||||
op.drop_table("are_entreprise_log")
|
|
||||||
# ### end Alembic commands ###
|
|
Loading…
Reference in New Issue
Block a user