edgedb-cli icon indicating copy to clipboard operation
edgedb-cli copied to clipboard

Allow branching to and from different instances

Open scotttrinh opened this issue 1 year ago • 3 comments

Right now, the branch create command only operates on the connected instance. It would be useful to be able to specify different instances for the source and target so you can, for instance, copy just the schema of your production database into CI without having to manually create a schema-only branch and use dump->restore, or having to run all of the migrations.

scotttrinh avatar Jun 17 '24 14:06 scotttrinh

It would probably have to work by doing an edgedb dump/restore, but that's maybe fine

msullivan avatar Jun 17 '24 14:06 msullivan

@msullivan

It would probably have to work by doing an edgedb dump/restore, but that's maybe fine

Yeah it seems like if we expose a way to do this in the CLI, we can start with:

  1. Create a temporary schema-only branch
  2. Dump schema-only branch
  3. Restore schema-only branch to target instance

And then if we come up with a better way to do this in the future, we can swap that in when possible, but use the same command.

scotttrinh avatar Jun 18 '24 14:06 scotttrinh

This would be superb

CallumAlder avatar Jun 27 '24 16:06 CallumAlder