Currently, cain is only able to restore if a schema exists, and is in the same as the specified tag.
We could add an option to restore the schema as well, to avoid having to create the schema before restoring.
Implementation:
add a --schema string flag to restore, which will be used to specify which schema you wish to restore.
Expected behavior:
if --schema is not specified and schema does not exist - keep current behavior (error)
if --schema is not specified and schema exists and - keep current behavior (try to restore)
if --schema is specified and schema does not exist - restore schema and try to restore
if --schema is specified and schema exists and they are equal - keep current behavior (try to restore)
if --schema is specified and schema exists and they are not equal - error
Currently, cain is only able to restore if a schema exists, and is in the same as the specified
tag
.We could add an option to restore the schema as well, to avoid having to create the schema before restoring.
Implementation: add a
--schema
string flag torestore
, which will be used to specify which schema you wish to restore.Expected behavior: if
--schema
is not specified and schema does not exist - keep current behavior (error) if--schema
is not specified and schema exists and - keep current behavior (try to restore) if--schema
is specified and schema does not exist - restore schema and try to restore if--schema
is specified and schema exists and they are equal - keep current behavior (try to restore) if--schema
is specified and schema exists and they are not equal - error