| 123456789101112131415161718192021 |
- <?php
- namespace Entity;
- class Config extends ModelBase
- {
- protected function install()
- {
- $dbPrefix = $this->getDbPrefix();
- $result = self::$dbo->exec("CREATE TABLE IF NOT EXISTS `{$dbPrefix}config` (
- `lang` VARCHAR(8) NULL,
- `key` VARCHAR(64) NOT NULL,
- `value` TEXT NULL,
- UNIQUE(`lang`, `key`)
- )");
- if ($result === false)
- throw new \Exception(get_class().": ".self::$dbo->errorInfo()[2]);
- return true;
- }
- }
|