dbos 1.11.0a2__py3-none-any.whl → 1.11.0a4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbos might be problematic. Click here for more details.
- dbos/cli/migration.py +12 -8
- {dbos-1.11.0a2.dist-info → dbos-1.11.0a4.dist-info}/METADATA +1 -1
- {dbos-1.11.0a2.dist-info → dbos-1.11.0a4.dist-info}/RECORD +6 -6
- {dbos-1.11.0a2.dist-info → dbos-1.11.0a4.dist-info}/WHEEL +0 -0
- {dbos-1.11.0a2.dist-info → dbos-1.11.0a4.dist-info}/entry_points.txt +0 -0
- {dbos-1.11.0a2.dist-info → dbos-1.11.0a4.dist-info}/licenses/LICENSE +0 -0
dbos/cli/migration.py
CHANGED
|
@@ -46,40 +46,44 @@ def grant_dbos_schema_permissions(database_url: str, role_name: str) -> None:
|
|
|
46
46
|
)
|
|
47
47
|
engine = None
|
|
48
48
|
try:
|
|
49
|
-
engine = sa.create_engine(
|
|
49
|
+
engine = sa.create_engine(
|
|
50
|
+
sa.make_url(database_url).set(drivername="postgresql+psycopg")
|
|
51
|
+
)
|
|
50
52
|
with engine.connect() as connection:
|
|
51
53
|
connection.execution_options(isolation_level="AUTOCOMMIT")
|
|
52
54
|
|
|
53
55
|
# Grant usage on the dbos schema
|
|
54
|
-
sql = f
|
|
56
|
+
sql = f'GRANT USAGE ON SCHEMA dbos TO "{role_name}"'
|
|
55
57
|
typer.echo(sql)
|
|
56
58
|
connection.execute(sa.text(sql))
|
|
57
59
|
|
|
58
60
|
# Grant all privileges on all existing tables in dbos schema (includes views)
|
|
59
|
-
sql = f
|
|
61
|
+
sql = f'GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA dbos TO "{role_name}"'
|
|
60
62
|
typer.echo(sql)
|
|
61
63
|
connection.execute(sa.text(sql))
|
|
62
64
|
|
|
63
65
|
# Grant all privileges on all sequences in dbos schema
|
|
64
|
-
sql =
|
|
66
|
+
sql = (
|
|
67
|
+
f'GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA dbos TO "{role_name}"'
|
|
68
|
+
)
|
|
65
69
|
typer.echo(sql)
|
|
66
70
|
connection.execute(sa.text(sql))
|
|
67
71
|
|
|
68
72
|
# Grant execute on all functions and procedures in dbos schema
|
|
69
|
-
sql = f
|
|
73
|
+
sql = f'GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA dbos TO "{role_name}"'
|
|
70
74
|
typer.echo(sql)
|
|
71
75
|
connection.execute(sa.text(sql))
|
|
72
76
|
|
|
73
77
|
# Grant default privileges for future objects in dbos schema
|
|
74
|
-
sql = f
|
|
78
|
+
sql = f'ALTER DEFAULT PRIVILEGES IN SCHEMA dbos GRANT ALL ON TABLES TO "{role_name}"'
|
|
75
79
|
typer.echo(sql)
|
|
76
80
|
connection.execute(sa.text(sql))
|
|
77
81
|
|
|
78
|
-
sql = f
|
|
82
|
+
sql = f'ALTER DEFAULT PRIVILEGES IN SCHEMA dbos GRANT ALL ON SEQUENCES TO "{role_name}"'
|
|
79
83
|
typer.echo(sql)
|
|
80
84
|
connection.execute(sa.text(sql))
|
|
81
85
|
|
|
82
|
-
sql = f
|
|
86
|
+
sql = f'ALTER DEFAULT PRIVILEGES IN SCHEMA dbos GRANT EXECUTE ON FUNCTIONS TO "{role_name}"'
|
|
83
87
|
typer.echo(sql)
|
|
84
88
|
connection.execute(sa.text(sql))
|
|
85
89
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-1.11.
|
|
2
|
-
dbos-1.11.
|
|
3
|
-
dbos-1.11.
|
|
4
|
-
dbos-1.11.
|
|
1
|
+
dbos-1.11.0a4.dist-info/METADATA,sha256=IUvfrt5KygPJY914lRKivouaEj-2cuhhNnn9Galhi7k,13268
|
|
2
|
+
dbos-1.11.0a4.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
dbos-1.11.0a4.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
|
|
4
|
+
dbos-1.11.0a4.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=NssPCubaBxdiKarOWa-wViz1hdJSkmBGcpLX_gQ4NeA,891
|
|
6
6
|
dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
|
|
7
7
|
dbos/_admin_server.py,sha256=e8ELhcDWqR3_PNobnNgUvLGh5lzZq0yFSF6dvtzoQRI,16267
|
|
@@ -67,8 +67,8 @@ dbos/_workflow_commands.py,sha256=EmmAaQfRWeOZm_WPTznuU-O3he3jiSzzT9VpYrhxugE,48
|
|
|
67
67
|
dbos/cli/_github_init.py,sha256=Y_bDF9gfO2jB1id4FV5h1oIxEJRWyqVjhb7bNEa5nQ0,3224
|
|
68
68
|
dbos/cli/_template_init.py,sha256=7JBcpMqP1r2mfCnvWatu33z8ctEGHJarlZYKgB83cXE,2972
|
|
69
69
|
dbos/cli/cli.py,sha256=ey7E-lNFgvUWhsd-mkFwZvTdYorv6hU2zsMOS23n1yQ,22214
|
|
70
|
-
dbos/cli/migration.py,sha256=
|
|
70
|
+
dbos/cli/migration.py,sha256=eI0sc0vYq2iUP3cBHPfTa6WHCyDBr8ld9nRxEZZzFrU,3316
|
|
71
71
|
dbos/dbos-config.schema.json,sha256=CjaspeYmOkx6Ip_pcxtmfXJTn_YGdSx_0pcPBF7KZmo,6060
|
|
72
72
|
dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
|
|
73
73
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
74
|
-
dbos-1.11.
|
|
74
|
+
dbos-1.11.0a4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|