dbUtility

The dbUtility allows you to seamlessly add and alter custom schema within Mura's database. Here's a basic example creating a table with an auto-incrementing primary key.

Here's example of creating a table and explicitly setting the primary key as well as an index.

Here's an example of adding a foreignKey.

Key Points

  1. Valid datatypes are INT, TINYINT, CHAR, VARCHAR, TEXT, LONGTEXT, DATETIME, FLOAT, DOUBLE
  2. You use the LENGTH argument with CHAR and VARCHAR datatypes.
  3. If you add a column to a table that does not exists, it will create the table.
  4. If you add a column that already exists, it will be updated.

Key Methods