1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pgadmin_ynh.git synced 2024-09-03 19:56:38 +02:00
pgadmin_ynh/scripts/patch/avoid_create_user_on_setup_db.patch
2024-03-12 12:13:11 +01:00

41 lines
1.4 KiB
Diff

diff --git a/migrations/versions/fdc58d9bd449_.py b/migrations/versions/fdc58d9bd449_.py
index 3a9991a5c..27fe21692 100644
--- a/migrations/versions/fdc58d9bd449_.py
+++ b/migrations/versions/fdc58d9bd449_.py
@@ -35,7 +35,8 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
- email, password = user_info()
+ # BEGIN Yunohost Patch
+ # END Yunohost Patch
version_table = op.create_table(
'version', sa.Column('name', sa.String(length=32), nullable=False),
@@ -122,11 +123,8 @@ def upgrade():
setattr(config, 'SECURITY_PASSWORD_SALT', current_salt)
setattr(config, 'SECRET_KEY', secret_key)
- password = hash_password(password)
-
- op.bulk_insert(user_table,
- [{'email': email, 'password': password,
- 'active': 1, 'confirmed_at': None}])
+ # BEGIN Yunohost Patch
+ # END Yunohost Patch
op.bulk_insert(version_table,
[{'name': 'ConfigDB', 'value': 2}])
@@ -135,11 +133,8 @@ def upgrade():
[{'name': 'Administrators',
'description': 'pgAdmin Administrators Role'}])
- op.bulk_insert(roles_users_table,
- [{'user_id': 1, 'role_id': 1}])
-
- op.bulk_insert(server_group_table,
- [{'user_id': 1, 'name': 'Servers'}])
+ # BEGIN Yunohost Patch
+ # END Yunohost Patch
# ### end Alembic commands ###