-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-382 remove billing worker (#2191)
- Loading branch information
1 parent
1b110b8
commit afe8ad0
Showing
21 changed files
with
100 additions
and
1,614 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
alembic/versions/13c284f200c9_remove_jobs_fully_billed_index.py
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,29 @@ | ||
"""remove jobs_fully_billed_index | ||
Revision ID: 13c284f200c9 | ||
Revises: 631e12f654a4 | ||
Create Date: 2024-10-03 09:52:28.579238 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "13c284f200c9" | ||
down_revision = "631e12f654a4" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.drop_index("jobs_fully_billed_index", table_name="jobs") | ||
|
||
|
||
def downgrade() -> None: | ||
op.create_index( | ||
"jobs_fully_billed_index", | ||
"jobs", | ||
[sa.text("(((payload ->> 'fully_billed'::text))::boolean)")], | ||
) |
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,43 @@ | ||
"""remove billing_log table | ||
Revision ID: fc114b57a56c | ||
Revises: 13c284f200c9 | ||
Create Date: 2024-10-03 10:35:09.025409 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
import sqlalchemy.dialects.postgresql as sapg | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "fc114b57a56c" | ||
down_revision = "13c284f200c9" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.drop_table("billing_log") | ||
op.drop_table("sync_record") | ||
|
||
|
||
def downgrade() -> None: | ||
op.create_table( | ||
"billing_log", | ||
sa.Column("id", sa.Integer(), primary_key=True), | ||
sa.Column("job_id", sa.String(), nullable=False), | ||
# All other fields | ||
sa.Column("payload", sapg.JSONB(), nullable=False), | ||
) | ||
op.create_table( | ||
"sync_record", | ||
sa.Column("type", sa.String(), primary_key=True), | ||
sa.Column("last_entry_id", sa.Integer()), | ||
) | ||
op.create_index( | ||
"billing_log_job_index", | ||
"billing_log", | ||
["job_id"], | ||
) |
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
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
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.