-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expanded api to include bdx feeds, ga4 properties, ga4 streams, go cl…
…oud properties
- Loading branch information
1 parent
18c6637
commit efda0c5
Showing
72 changed files
with
4,905 additions
and
520 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
alembic/versions/67ab88f410ce_added_website_id_to_ga4_stream_removed_.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,54 @@ | ||
"""added website id to ga4 stream, removed from ga4 property | ||
Revision ID: 67ab88f410ce | ||
Revises: cce84fb59468 | ||
Create Date: 2024-04-27 16:11:39.934879 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
import sqlalchemy_utils # type: ignore | ||
from app.db.custom_types import LongText | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '67ab88f410ce' | ||
down_revision = 'cce84fb59468' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_unique_constraint(None, 'go_a4', ['property_id']) | ||
op.drop_constraint('go_a4_ibfk_2', 'go_a4', type_='foreignkey') | ||
op.drop_column('go_a4', 'website_id') | ||
op.add_column('go_a4_stream', sa.Column('website_id', sqlalchemy_utils.types.uuid.UUIDType(binary=False), nullable=False)) | ||
op.create_foreign_key(None, 'go_a4_stream', 'website', ['website_id'], ['id']) | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.drop_constraint(None, 'go_a4_stream', type_='foreignkey') # type: ignore | ||
op.drop_column('go_a4_stream', 'website_id') | ||
op.add_column('go_a4', sa.Column('website_id', mysql.CHAR(length=32), nullable=False)) | ||
op.create_foreign_key('go_a4_ibfk_2', 'go_a4', 'website', ['website_id'], ['id']) | ||
op.drop_constraint(None, 'go_a4', type_='unique') # type: ignore | ||
# ### 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""revised bdx feed table | ||
Revision ID: c934ef207888 | ||
Revises: 67ab88f410ce | ||
Create Date: 2024-04-28 14:04:00.705835 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
from app.db.custom_types import LongText | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c934ef207888' | ||
down_revision = '67ab88f410ce' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index('username', table_name='bdx_feed') | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.create_index('username', 'bdx_feed', ['username'], unique=True) | ||
# ### 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
"""altered go_cloud table | ||
Revision ID: e84b73490a04 | ||
Revises: c934ef207888 | ||
Create Date: 2024-04-28 20:14:51.670740 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
import sqlalchemy_utils # type: ignore | ||
from app.db.custom_types import LongText | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'e84b73490a04' | ||
down_revision = 'c934ef207888' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('go_cloud', 'project_id', | ||
existing_type=mysql.VARCHAR(length=704), | ||
type_=sqlalchemy_utils.types.encrypted.encrypted_type.StringEncryptedType(length=472), | ||
existing_nullable=False) | ||
op.alter_column('go_cloud', 'project_number', | ||
existing_type=mysql.VARCHAR(length=704), | ||
type_=sqlalchemy_utils.types.encrypted.encrypted_type.StringEncryptedType(length=472), | ||
existing_nullable=False) | ||
op.alter_column('go_cloud', 'service_account', | ||
existing_type=mysql.VARCHAR(length=704), | ||
nullable=True) | ||
op.create_unique_constraint(None, 'go_cloud', ['project_number']) | ||
op.create_unique_constraint(None, 'go_cloud', ['project_id']) | ||
op.create_unique_constraint(None, 'go_cloud', ['service_account']) | ||
op.drop_column('go_cloud', 'api_key') | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=mysql.LONGBLOB(), | ||
type_=LongText(), | ||
existing_nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('website_keywordcorpus', 'rawtext', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.alter_column('website_keywordcorpus', 'corpus', | ||
existing_type=LongText(), | ||
type_=mysql.LONGBLOB(), | ||
existing_nullable=False) | ||
op.add_column('go_cloud', sa.Column('api_key', mysql.VARCHAR(length=704), nullable=False)) | ||
op.drop_constraint(None, 'go_cloud', type_='unique') # type: ignore | ||
op.drop_constraint(None, 'go_cloud', type_='unique') # type: ignore | ||
op.drop_constraint(None, 'go_cloud', type_='unique') # type: ignore | ||
op.alter_column('go_cloud', 'service_account', | ||
existing_type=mysql.VARCHAR(length=704), | ||
nullable=False) | ||
op.alter_column('go_cloud', 'project_number', | ||
existing_type=sqlalchemy_utils.types.encrypted.encrypted_type.StringEncryptedType(length=472), | ||
type_=mysql.VARCHAR(length=704), | ||
existing_nullable=False) | ||
op.alter_column('go_cloud', 'project_id', | ||
existing_type=sqlalchemy_utils.types.encrypted.encrypted_type.StringEncryptedType(length=472), | ||
type_=mysql.VARCHAR(length=704), | ||
existing_nullable=False) | ||
# ### 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
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
Oops, something went wrong.