FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sgr/splitgraph/engine/utils.py at master · splitgraph/sgr · GitHub
splitgraph
/
sgr
Public
Notifications
You must be signed in to change notification settings
Fork
19
Star
324
Code
Issues
19
Pull requests
35
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sgr
/
splitgraph
/
engine
/
utils.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (10 loc) · 540 Bytes
Breadcrumbs
sgr
/
splitgraph
/
engine
/
utils.py
Copy path
File metadata and controls
14 lines (10 loc) · 540 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from
typing
import
TYPE_CHECKING
from
psycopg2
.
sql
import
SQL
,
Identifier
if
TYPE_CHECKING
:
from
splitgraph
.
engine
.
postgres
.
psycopg
import
PsycopgEngine
def
unmount_schema
(
engine
:
"PsycopgEngine"
,
schema
:
str
)
->
None
:
engine
.
run_sql
(
SQL
(
"DROP SERVER IF EXISTS {} CASCADE"
).
format
(
Identifier
(
"%s_lq_checkout_server"
%
schema
))
)
engine
.
run_sql
(
SQL
(
"DROP SERVER IF EXISTS {} CASCADE"
).
format
(
Identifier
(
schema
+
"_server"
)))
engine
.
run_sql
(
SQL
(
"DROP SCHEMA IF EXISTS {} CASCADE"
).
format
(
Identifier
(
schema
)))
Back
|
FazBrowse Home
|
New Git URL