MailMessage::createTable PHP Method

createTable() public method

メッセージテーブルを作成する
public createTable ( $mailContentId ) : boolean
return boolean
    public function createTable($mailContentId)
    {
        $db = $this->getDataSource();
        $schema = array('id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 8, 'key' => 'primary'), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)));
        $table = $this->createTableName($mailContentId);
        $ret = true;
        if ($this->tableExists($db->config['prefix'] . $table)) {
            $ret = $db->dropTable(array('table' => $table));
        }
        if (!$ret) {
            return false;
        }
        $ret = $db->createTable(array('schema' => $schema, 'table' => $table));
        $this->deleteModelCache();
        return $ret;
    }