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
Unknown Object (File)
Sat, Dec 21, 6:07 PM
Unknown Object (File)
Thu, Dec 12, 1:56 AM
Unknown Object (File)
Tue, Dec 10, 9:39 AM
Unknown Object (File)
Mon, Dec 9, 3:50 PM
Unknown Object (File)
Mon, Dec 9, 3:50 PM
Unknown Object (File)
Mon, Dec 9, 3:49 PM
Unknown Object (File)
Mon, Dec 9, 3:43 PM
Unknown Object (File)
Thu, Nov 28, 12:02 PM
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