-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in additional indexes for DW. (#1357)
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""Improves performance for DW summary view, from 500s -> 30s for a months worth of data. | ||
Revision ID: eec11500a81e | ||
Revises: 49eaec3210e0 | ||
Create Date: 2024-01-05 11:28:12.564770 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'eec11500a81e' | ||
down_revision = '49eaec3210e0' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_index(op.f('ix_ejv_invoice_links_ejv_header_id'), 'ejv_invoice_links', ['ejv_header_id'], unique=False) | ||
op.create_index(op.f('ix_ejv_invoice_links_invoice_id'), 'ejv_invoice_links', ['invoice_id'], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_ejv_invoice_links_invoice_id'), table_name='ejv_invoice_links') | ||
op.drop_index(op.f('ix_ejv_invoice_links_ejv_header_id'), table_name='ejv_invoice_links') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters