Get Database Definition | Create Database |
MDB2_Schema | |
PEAR Manual | |
You can use dumpDatabase() to copy your database to a schema file. dumpDatabase() accepts a database definition array, for instance:
|
The first parameter is just the database definition array. The second parameter is the options where we choose to output to a file. The third option tells dumpDatabase() what to be dumped - either the structure, the data in the tables, or both. This is defined using the constants MDB2_SCHEMA_DUMP_STRUCTURE, MDB2_SCHEMA_DUMP_CONTENT and MDB2_SCHEMA_DUMP_ALL.
Some databases don't accept a text field with a default value. Given that, notice that $options['force_defaults'] has to be set to false when you want to create a field with the type text, as it is true by default.
Get Database Definition | Create Database |
MDB2_Schema | |
PEAR Manual | |