it-planet-springboard/api/app/database/alembic/versions/f1770fb9bc22_0001_инициализация.py

488 lines
27 KiB
Python

"""0001 инициализация
Revision ID: f1770fb9bc22
Revises:
Create Date: 2026-03-21 08:50:13.958112
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'f1770fb9bc22'
down_revision: Union[str, Sequence[str], None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('applicant_contact_statuses',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_skill_tag_categories',
sa.Column('title', sa.String(length=150), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('company_profile_logos',
sa.Column('filename', sa.String(length=250), nullable=False),
sa.Column('path', sa.String(length=500), nullable=False),
sa.Column('url', sa.String(length=500), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('company_profile_photos',
sa.Column('filename', sa.String(length=250), nullable=False),
sa.Column('path', sa.String(length=500), nullable=False),
sa.Column('url', sa.String(length=500), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('employment_types',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('event_types',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('experience_levels',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('industries',
sa.Column('title', sa.String(length=150), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('location_coordinates',
sa.Column('latitude', sa.Float(), nullable=False),
sa.Column('longitude', sa.Float(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('moderation_statuses',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('roles',
sa.Column('title', sa.String(length=150), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('title'),
schema='public'
)
op.create_table('universities',
sa.Column('title', sa.String(length=300), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('work_formats',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_skill_tags',
sa.Column('title', sa.String(length=150), nullable=False),
sa.Column('category_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['category_id'], ['public.applicant_skill_tag_categories.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('users',
sa.Column('first_name', sa.String(length=250), nullable=False),
sa.Column('last_name', sa.String(length=250), nullable=False),
sa.Column('patronymic', sa.String(length=250), nullable=True),
sa.Column('birthdate', sa.Date(), nullable=False),
sa.Column('login', sa.String(length=250), nullable=False),
sa.Column('email', sa.String(length=250), nullable=True),
sa.Column('password_hash', sa.String(), nullable=False),
sa.Column('role_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['role_id'], ['public.roles.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email'),
sa.UniqueConstraint('login'),
schema='public'
)
op.create_table('applicant_profiles',
sa.Column('resume_html', sa.Text(), nullable=True),
sa.Column('resume_url', sa.String(length=500), nullable=True),
sa.Column('university_id', sa.Integer(), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['university_id'], ['public.universities.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['public.users.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('company_profiles',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('website_url', sa.String(length=500), nullable=True),
sa.Column('inn', sa.String(length=50), nullable=True),
sa.Column('corporate_email', sa.String(length=250), nullable=True),
sa.Column('video_url', sa.String(length=500), nullable=True),
sa.Column('is_verified', sa.Boolean(), nullable=False),
sa.Column('logo_id', sa.Integer(), nullable=True),
sa.Column('official_photo_id', sa.Integer(), nullable=True),
sa.Column('creator_user_id', sa.Integer(), nullable=False),
sa.Column('industry_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['creator_user_id'], ['public.users.id'], ),
sa.ForeignKeyConstraint(['industry_id'], ['public.industries.id'], ),
sa.ForeignKeyConstraint(['logo_id'], ['public.company_profile_logos.id'], ),
sa.ForeignKeyConstraint(['official_photo_id'], ['public.company_profile_photos.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_contact_recommendations',
sa.Column('message', sa.Text(), nullable=False),
sa.Column('recommender_id', sa.Integer(), nullable=False),
sa.Column('recipient_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['recipient_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['recommender_id'], ['public.applicant_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_contacts',
sa.Column('sender_id', sa.Integer(), nullable=False),
sa.Column('receiver_id', sa.Integer(), nullable=False),
sa.Column('status_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['receiver_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['sender_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['status_id'], ['public.applicant_contact_statuses.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_educations',
sa.Column('start_education_year', sa.Integer(), nullable=False),
sa.Column('end_education_year', sa.Integer(), nullable=True),
sa.Column('specialization', sa.String(length=300), nullable=False),
sa.Column('is_in_the_learning', sa.Boolean(), nullable=False),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('university_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['university_id'], ['public.universities.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_experiences',
sa.Column('company_name', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('start_date', sa.Date(), nullable=False),
sa.Column('end_date', sa.Date(), nullable=True),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_favorite_companies',
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_resume_files',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('filename', sa.String(), nullable=False),
sa.Column('file_path', sa.String(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_resume_links',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('link', sa.String(length=500), nullable=False),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_resume_projects',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('link', sa.String(length=500), nullable=True),
sa.Column('repository_url', sa.String(length=500), nullable=True),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('applicant_skills',
sa.Column('level', sa.String(length=50), nullable=False),
sa.Column('tag_id', sa.Integer(), nullable=False),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['tag_id'], ['public.applicant_skill_tags.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('career_events',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('media_url', sa.String(length=500), nullable=True),
sa.Column('address', sa.String(length=500), nullable=True),
sa.Column('published_at', sa.DateTime(), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('moderation_comment', sa.Text(), nullable=True),
sa.Column('event_date', sa.DateTime(), nullable=False),
sa.Column('registration_link', sa.String(length=500), nullable=True),
sa.Column('is_online', sa.Boolean(), nullable=False),
sa.Column('event_type_id', sa.Integer(), nullable=False),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('moderation_status_id', sa.Integer(), nullable=False),
sa.Column('location_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.ForeignKeyConstraint(['event_type_id'], ['public.event_types.id'], ),
sa.ForeignKeyConstraint(['location_id'], ['public.location_coordinates.id'], ),
sa.ForeignKeyConstraint(['moderation_status_id'], ['public.moderation_statuses.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('company_profile_socials',
sa.Column('title', sa.String(length=100), nullable=False),
sa.Column('link', sa.String(length=500), nullable=False),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('internships',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('media_url', sa.String(length=500), nullable=True),
sa.Column('address', sa.String(length=500), nullable=True),
sa.Column('published_at', sa.DateTime(), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('moderation_comment', sa.Text(), nullable=True),
sa.Column('duration_months', sa.Integer(), nullable=False),
sa.Column('is_paid', sa.Boolean(), nullable=False),
sa.Column('mentorship_available', sa.Boolean(), nullable=False),
sa.Column('expires_at', sa.DateTime(), nullable=True),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('moderation_status_id', sa.Integer(), nullable=False),
sa.Column('experience_level_id', sa.Integer(), nullable=False),
sa.Column('work_format_id', sa.Integer(), nullable=False),
sa.Column('location_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.ForeignKeyConstraint(['experience_level_id'], ['public.experience_levels.id'], ),
sa.ForeignKeyConstraint(['location_id'], ['public.location_coordinates.id'], ),
sa.ForeignKeyConstraint(['moderation_status_id'], ['public.moderation_statuses.id'], ),
sa.ForeignKeyConstraint(['work_format_id'], ['public.work_formats.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('mentorship_programs',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('media_url', sa.String(length=500), nullable=True),
sa.Column('address', sa.String(length=500), nullable=True),
sa.Column('published_at', sa.DateTime(), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('moderation_comment', sa.Text(), nullable=True),
sa.Column('mentor_name', sa.String(length=250), nullable=True),
sa.Column('focus_area', sa.String(length=250), nullable=True),
sa.Column('selection_criteria', sa.Text(), nullable=True),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('moderation_status_id', sa.Integer(), nullable=False),
sa.Column('location_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.ForeignKeyConstraint(['location_id'], ['public.location_coordinates.id'], ),
sa.ForeignKeyConstraint(['moderation_status_id'], ['public.moderation_statuses.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('vacancies',
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('media_url', sa.String(length=500), nullable=True),
sa.Column('address', sa.String(length=500), nullable=True),
sa.Column('published_at', sa.DateTime(), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=False),
sa.Column('moderation_comment', sa.Text(), nullable=True),
sa.Column('expires_at', sa.DateTime(), nullable=True),
sa.Column('salary_min', sa.Integer(), nullable=True),
sa.Column('salary_max', sa.Integer(), nullable=True),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('work_format_id', sa.Integer(), nullable=False),
sa.Column('employment_type_id', sa.Integer(), nullable=False),
sa.Column('experience_level_id', sa.Integer(), nullable=False),
sa.Column('moderation_status_id', sa.Integer(), nullable=False),
sa.Column('location_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.ForeignKeyConstraint(['employment_type_id'], ['public.employment_types.id'], ),
sa.ForeignKeyConstraint(['experience_level_id'], ['public.experience_levels.id'], ),
sa.ForeignKeyConstraint(['location_id'], ['public.location_coordinates.id'], ),
sa.ForeignKeyConstraint(['moderation_status_id'], ['public.moderation_statuses.id'], ),
sa.ForeignKeyConstraint(['work_format_id'], ['public.work_formats.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('verification_requests',
sa.Column('is_accepted', sa.Boolean(), nullable=False),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['public.company_profiles.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
op.create_table('vacancy_applications',
sa.Column('cover_letter', sa.Text(), nullable=True),
sa.Column('employer_note', sa.Text(), nullable=True),
sa.Column('vacancy_id', sa.Integer(), nullable=False),
sa.Column('applicant_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
sa.ForeignKeyConstraint(['applicant_id'], ['public.applicant_profiles.id'], ),
sa.ForeignKeyConstraint(['vacancy_id'], ['public.vacancies.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='public'
)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('vacancy_applications', schema='public')
op.drop_table('verification_requests', schema='public')
op.drop_table('vacancies', schema='public')
op.drop_table('mentorship_programs', schema='public')
op.drop_table('internships', schema='public')
op.drop_table('company_profile_socials', schema='public')
op.drop_table('career_events', schema='public')
op.drop_table('applicant_skills', schema='public')
op.drop_table('applicant_resume_projects', schema='public')
op.drop_table('applicant_resume_links', schema='public')
op.drop_table('applicant_resume_files', schema='public')
op.drop_table('applicant_favorite_companies', schema='public')
op.drop_table('applicant_experiences', schema='public')
op.drop_table('applicant_educations', schema='public')
op.drop_table('applicant_contacts', schema='public')
op.drop_table('applicant_contact_recommendations', schema='public')
op.drop_table('company_profiles', schema='public')
op.drop_table('applicant_profiles', schema='public')
op.drop_table('users', schema='public')
op.drop_table('applicant_skill_tags', schema='public')
op.drop_table('work_formats', schema='public')
op.drop_table('universities', schema='public')
op.drop_table('roles', schema='public')
op.drop_table('moderation_statuses', schema='public')
op.drop_table('location_coordinates', schema='public')
op.drop_table('industries', schema='public')
op.drop_table('experience_levels', schema='public')
op.drop_table('event_types', schema='public')
op.drop_table('employment_types', schema='public')
op.drop_table('company_profile_photos', schema='public')
op.drop_table('company_profile_logos', schema='public')
op.drop_table('applicant_skill_tag_categories', schema='public')
op.drop_table('applicant_contact_statuses', schema='public')
# ### end Alembic commands ###