|
|
@ -22,7 +22,7 @@ def upgrade():
|
|
|
|
sa.Column('name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('max_users', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('max_users', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('max_aliases', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('max_aliases', sa.Integer(), nullable=False),
|
|
|
|
sa.PrimaryKeyConstraint('name')
|
|
|
|
sa.PrimaryKeyConstraint('name', name=op.f('domain_pkey'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('alias',
|
|
|
|
op.create_table('alias',
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
@ -32,8 +32,8 @@ def upgrade():
|
|
|
|
sa.Column('destination', sa.String(length=1023), nullable=False),
|
|
|
|
sa.Column('destination', sa.String(length=1023), nullable=False),
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('email', sa.String(length=255), nullable=False),
|
|
|
|
sa.Column('email', sa.String(length=255), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], ),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], name=op.f('alias_domain_name_fkey')),
|
|
|
|
sa.PrimaryKeyConstraint('email')
|
|
|
|
sa.PrimaryKeyConstraint('email', name=op.f('alias_pkey'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('user',
|
|
|
|
op.create_table('user',
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
@ -55,8 +55,8 @@ def upgrade():
|
|
|
|
sa.Column('spam_threshold', sa.Numeric(), nullable=False),
|
|
|
|
sa.Column('spam_threshold', sa.Numeric(), nullable=False),
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=False),
|
|
|
|
sa.Column('email', sa.String(length=255), nullable=False),
|
|
|
|
sa.Column('email', sa.String(length=255), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], ),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], name=op.f('user_domain_name_fkey')),
|
|
|
|
sa.PrimaryKeyConstraint('email')
|
|
|
|
sa.PrimaryKeyConstraint('email', name=op.f('user_pkey'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('fetch',
|
|
|
|
op.create_table('fetch',
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
|
sa.Column('created_at', sa.Date(), nullable=False),
|
|
|
@ -70,14 +70,14 @@ def upgrade():
|
|
|
|
sa.Column('tls', sa.Boolean(), nullable=False),
|
|
|
|
sa.Column('tls', sa.Boolean(), nullable=False),
|
|
|
|
sa.Column('username', sa.String(length=255), nullable=False),
|
|
|
|
sa.Column('username', sa.String(length=255), nullable=False),
|
|
|
|
sa.Column('password', sa.String(length=255), nullable=False),
|
|
|
|
sa.Column('password', sa.String(length=255), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(['user_email'], ['user.email'], ),
|
|
|
|
sa.ForeignKeyConstraint(['user_email'], ['user.email'], name=op.f('fetch_user_email_fkey')),
|
|
|
|
sa.PrimaryKeyConstraint('id')
|
|
|
|
sa.PrimaryKeyConstraint('id', name=op.f('fetch_pkey'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('manager',
|
|
|
|
op.create_table('manager',
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=True),
|
|
|
|
sa.Column('domain_name', sa.String(length=80), nullable=True),
|
|
|
|
sa.Column('user_email', sa.String(length=255), nullable=True),
|
|
|
|
sa.Column('user_email', sa.String(length=255), nullable=True),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], ),
|
|
|
|
sa.ForeignKeyConstraint(['domain_name'], ['domain.name'], name=op.f('manager_domain_name_fkey')),
|
|
|
|
sa.ForeignKeyConstraint(['user_email'], ['user.email'], )
|
|
|
|
sa.ForeignKeyConstraint(['user_email'], ['user.email'], name=op.f('manager_user_email_fkey'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|