dbtk/schema-loader

Load Database schema from XML

Maintainers

👁 joostfaassen

Package info

github.com/dbtk/schema-loader

pkg:composer/dbtk/schema-loader

Statistics

Installs: 4 297

Dependents: 6

Suggesters: 0

Stars: 5

Open Issues: 2

v2.7.1 2020-02-18 14:27 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 1de7e49c9072fd5efa7088f080c53dce85ede0e9

  • Joost Faassen <j.faassen.woop@linkorb.com>
  • LinkORB Engineering Team <engineering.woop@linkorb.com>

databasexmlschemaloaderlinkorb


README

Load database schema from an XML file.

Usage

You can load schema to database by:

Database url

A full URL containing username, password, hostname and dbname:

./bin/dbtk-schema-loader schema:load example/schema.xml mysql://username:password@localhost/dbname

Just a dbname

In this case linkorb/database-manager is used for loading database connection details (server, username, password, etc) from .conf files (read project readme for more details).

In a nutshell - you must have a dbname.conf file at /share/config/database/ as described at database-manager's documentation.

./bin/dbtk-schema-loader schema:load example/schema.xml dbname

Examples

See example/schema.xml or /tests/fixtures/schema.xml.

Notices

  • Don't forget to use notnull="false" for optional fields.
  • Don't use primaryKey="id" in table definition - in version ~2.0 indexes have new format.

License

Please refer to the included LICENSE file

Brought to you by the LinkORB Engineering team

👁 Image

Check out our other projects at engineering.linkorb.com.

Btw, we're hiring!