Page MenuHomePhabricator

Make `bin/storage dump` insert CREATE DATABASE and USE statements
ClosedPublic

Authored by epriestley on Oct 13 2017, 8:53 PM.
Tags
None
Referenced Files
F18791122: D18707.id.diff
Thu, Oct 16, 2:35 AM
F18748921: D18707.diff
Sat, Oct 4, 1:33 AM
F18509156: D18707.id.diff
Sep 5 2025, 3:15 AM
F18501738: D18707.diff
Sep 4 2025, 9:56 PM
F18217473: D18707.id44912.diff
Aug 19 2025, 8:56 AM
F18206414: D18707.id.diff
Aug 18 2025, 3:50 PM
F18193076: D18707.diff
Aug 17 2025, 4:59 AM
F18089535: D18707.id44912.diff
Aug 6 2025, 11:41 AM
Subscribers
None

Details

Summary

Ref T13000. The new approach for dumping database-by-database means that we don't get CREATE DATABASE or USE statements, which makes importing the dump again inconvenient.

Manually stitch these into the dump.

Test Plan
  • Used bin/storage dump --namespace ... to dump a smaller local instance.
  • Used bin/storage destroy --namespace ..., to destroy the namespace, then inported the dump cleanly.
  • Verified that each CREATE DATABASE statement appears only once.
  • Verified that bin/storage renamespace --live can correctly process this file.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable