Load database schema from an XML file.
You can load schema to database by:
A full URL containing username, password, hostname and dbname:
./bin/dbtk-schema-loader schema:load example/schema.xml mysql://username:password@localhost/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
See example/schema.xml
or /tests/fixtures/schema.xml
.
- 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.
Please refer to the included LICENSE file
Check out our other projects at engineering.linkorb.com.
Btw, we're hiring!