You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restores a dropped database. See the [`dolt_purge_dropped_databases()` stored procedure](#dolt_purge_dropped_databases) for info on how to permanently remove dropped databases.
1227
+
1228
+
```sql
1229
+
CALL DOLT_UNDROP(<database_name>);
1230
+
```
1231
+
1232
+
### Options
1233
+
1234
+
`dolt_undrop()` takes a single argument – the name of the dropped database to restore. When called without any arguments,
1235
+
`dolt_undrop()` returns an error message that contains a list of all dropped databases that are available to be restored.
1236
+
1237
+
### Example
1238
+
1239
+
```sql
1240
+
-- Create a database and populate a table in the working set
1241
+
CREATEDATABASEdatabase1;
1242
+
use database1;
1243
+
createtablet(pk intprimary key);
1244
+
1245
+
-- Dropping the database will move it to a temporary holding area
1246
+
DROPDATABASE database1;
1247
+
1248
+
-- calling dolt_undrop() with no arguments will return an error message that
1249
+
-- lists the dropped database that are available to be restored
1250
+
CALL dolt_undrop();
1251
+
1252
+
-- Use dolt_undrop() to restore it
1253
+
CALL dolt_undrop('database1');
1254
+
SELECT*FROMdatabase1.t;
1255
+
```
1256
+
1196
1257
## `DOLT_VERIFY_CONSTRAINTS()`
1197
1258
1198
1259
Verifies that working set changes (inserts, updates, and/or deletes) satisfy the
0 commit comments