mix dropdb (mscmp_syst_db v0.1.0)
Drops a previously loaded development supporting Datastore.
This command takes a number of options many of which match Mix.Tasks.Loaddb.
Insofar as they have corresponding options, the options used with this Mix
task should have values which match the command used to create the Datastore;
failing to do this could cause the drop operation to fail or fail partially.
Usage Note
There is nothing stopping you from using this command from dropping any
Datastore in the system and technically it should work. But the only
supported use of this command is for dropping development supporting
databases originally loaded with the Mix.Tasks.Loaddb task. Any other use
is at your own risk.
Note that all options other than --type have default values which match the
corresponding default values in Mix.Task.Loaddb.
Options
--ds-name- The Datastore Name used to identify the Datastore in the application. Specifically references parts of the supervisory system which manage the Datastore Contexts. This is an optional string value which defaults to "ms_devsupport_database".--db-host- The IP address or resolvable host name of the database server which hosts the Datastore to drop. This is an optional string value which defaults to "127.0.0.1".--db-port- The TCP port on which the database server is listening for connections. This is an optional integer value which defaults to5432.--db-name- The name of the database which backs the Datastore on the database server. Often times this will be the same as the Datastore Name, but not necessarily so. This is an optional string value which defaults to "ms_devsupport_database".--db-role-prefix- a string value which is used to prefix the owner and login Context database role names created by theMix.Tasks.Loaddbmix task. This value is optional and defaults to "ms_devsupport".--context-name- the name by which the login Context can be found withing the application. This is an optional string value which defaults to "ms_devsupport_context".--dbadmin-pwd- the password of thems_syst_privilegeddatabase role on the target database. This is an optional string value which defaults to "musesystems-insecure-publicly-known-password".--clean-all- if this switch is set, this task will delete all Datastore migration files created for the Component, including those that might not be related to the Datastore being dropped. This is done by simply deleting the path directory provided in the--destinationoption. This switch will supersede the--cleanoption if both switches are set.--cleanor-c- deletes any Datastore migrations built for the Datastore type identified by the--typeswitch. This switch is superseded by the--clean-alloption.--typeor-t- identifies the type of Datastore to clean when using the--cleanoption. This option becomes required if the--cleanswitch is set.--destinationor-d- establishes the path in which Datastore migrations were built. This option is only used if either the--clean-allor--cleanoptions are also set. This is an optional value which defaults to "priv/database".--bypass-stop-datastoreor-b- if this switch is set, this task will not try to stop the Datastore Contexts before dropping the database. This is useful if the database was only loaded, but an Elixir application was not started; an example of this is when database documentation is generated. This is a boolean switch and defaults to false.
Summary
Functions
@spec drop_database(MscmpSystDb.Types.DatastoreOptions.t(), Keyword.t()) :: :ok
@spec get_datastore_options(Keyword.t()) :: MscmpSystDb.Types.DatastoreOptions.t()
@spec load_database(MscmpSystDb.Types.DatastoreOptions.t(), String.t()) :: {:ok, [String.t()]} | {:error, Mserror.DbError.t()}
@spec run([binary()]) :: :ok
Callback implementation for Mix.Task.run/1.