Testys commited on
Commit
77c2932
1 Parent(s): d6866b9

Changed database for app

Browse files
alembic.ini CHANGED
@@ -60,8 +60,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
60
  # are written from script.py.mako
61
  # output_encoding = utf-8
62
 
63
- sqlalchemy.url = postgresql://snapfeast_db_owner:4fLiupkCsN5E@ep-fancy-glade-a57hqsn3-pooler.us-east-2.aws.neon.tech/snapdb?sslmode=require
64
-
65
 
66
  [post_write_hooks]
67
  # post_write_hooks defines scripts or Python functions that are run
 
60
  # are written from script.py.mako
61
  # output_encoding = utf-8
62
 
63
+ sqlalchemy.url = postgresql://snapfeast_db_owner:4fLiupkCsN5E@ep-fancy-glade-a57hqsn3-pooler.us-east-2.aws.neon.tech/feastdb?sslmode=require
 
64
 
65
  [post_write_hooks]
66
  # post_write_hooks defines scripts or Python functions that are run
alembic/versions/70948dfaa0fc_adding_changes_stated_from_app_.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Adding Changes stated from APP developer side
2
+
3
+ Revision ID: 70948dfaa0fc
4
+ Revises: 6936c1095473
5
+ Create Date: 2024-08-31 04:29:46.227399
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '70948dfaa0fc'
16
+ down_revision: Union[str, None] = '6936c1095473'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ pass
23
+
24
+
25
+ def downgrade() -> None:
26
+ pass
alembic/versions/a0b8222b39de_making_changes.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Making Changes
2
+
3
+ Revision ID: a0b8222b39de
4
+ Revises: 70948dfaa0fc
5
+ Create Date: 2024-08-31 04:33:49.475927
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = 'a0b8222b39de'
16
+ down_revision: Union[str, None] = '70948dfaa0fc'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ # ### commands auto generated by Alembic - please adjust! ###
23
+ op.create_table('recommendation_models',
24
+ sa.Column('id', sa.Integer(), nullable=False),
25
+ sa.Column('model', sa.LargeBinary(), nullable=False),
26
+ sa.Column('created_at', sa.DateTime(), nullable=True),
27
+ sa.PrimaryKeyConstraint('id')
28
+ )
29
+ op.create_index(op.f('ix_recommendation_models_id'), 'recommendation_models', ['id'], unique=False)
30
+ op.drop_index('ix_users_username', table_name='users')
31
+ op.drop_column('users', 'username')
32
+ # ### end Alembic commands ###
33
+
34
+
35
+ def downgrade() -> None:
36
+ # ### commands auto generated by Alembic - please adjust! ###
37
+ op.add_column('users', sa.Column('username', sa.VARCHAR(), autoincrement=False, nullable=False))
38
+ op.create_index('ix_users_username', 'users', ['username'], unique=True)
39
+ op.drop_index(op.f('ix_recommendation_models_id'), table_name='recommendation_models')
40
+ op.drop_table('recommendation_models')
41
+ # ### end Alembic commands ###