Skip to content

Commit

Permalink
Merge pull request #133 from EcorRouge/asim-migrations-lib-fix
Browse files Browse the repository at this point in the history
[FIX] Fix a bug in migrations lib
  • Loading branch information
asymness authored Dec 30, 2024
2 parents 8e528dd + 7e18c3a commit dc61e44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions rococo/migrations/mysql/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

class Migration:
def __init__(self, db_adapter):
self.db_adapter = db_adapter
self.db_adapter: MySqlAdapter = db_adapter

def _does_column_exist(self, table_name, column_name, commit: bool = True):
schema_name = self.db_adapter.database
schema_name = self.db_adapter._database
query = f"""
SELECT COUNT(*)
FROM information_schema.COLUMNS
Expand All @@ -20,7 +20,7 @@ def _does_column_exist(self, table_name, column_name, commit: bool = True):
return response[0].get("COUNT(*)") > 0

def _does_primary_key_constraint_exists(self, table_name, commit: bool = True):
schema_name = self.db_adapter.database
schema_name = self.db_adapter._database
query = f"""
SELECT COUNT(*)
FROM information_schema.TABLE_CONSTRAINTS
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='rococo',
version='1.0.25',
version='1.0.27',
packages=find_packages(),
url='https://github.com/EcorRouge/rococo',
license='MIT',
Expand All @@ -18,7 +18,7 @@
long_description_content_type='text/markdown',
install_requires=[
'surrealdb==0.3.2',
'boto3==1.28.55',
'boto3>=1.28.55',
'pika==1.3.2',
'python-dotenv==1.0.0',
'PyMySQL==1.1.1',
Expand Down

0 comments on commit dc61e44

Please sign in to comment.