Пример #1
0
 /**
  * Create a key.
  *
  * @param string $table
  *            Table name.
  * @param string $key
  *            Key name.
  * @param string[] $columns
  *            Columns.
  * @param bool $unique
  *            Uniqueness.
  */
 protected function createKey($table, $key, array $columns, $unique = true)
 {
     try {
         $this->db->createKey($table, $key, $columns, $unique);
         $this->definition->createKey($table, $key, $columns, $unique);
     } catch (\Exception $e) {
         if (!$this->ignoreExceptions) {
             throw $e;
         }
     }
 }