| 12345678910111213141516171819202122 |
- <?php
- namespace Entity;
- class Cms extends ModelBase
- {
- protected function install()
- {
- $dbPrefix = $this->getDbPrefix();
- $result = self::$dbo->exec("CREATE TABLE IF NOT EXISTS `{$dbPrefix}cms` (
- `id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `shurl` VARCHAR(255) NOT NULL,
- `controller` VARCHAR(255) NOT NULL,
- `order` INTEGER UNSIGNED NOT NULL DEFAULT 0,
- UNIQUE(`shurl`)
- )");
- if ($result === false)
- throw new \Exception(get_class().": ".self::$dbo->errorInfo()[2]);
- return true;
- }
- }
|