diff options
author | Chris Cornutt <enygma@phpdeveloper.org> | 2015-05-29 21:55:47 -0500 |
---|---|---|
committer | Chris Cornutt <enygma@phpdeveloper.org> | 2015-05-29 21:55:47 -0500 |
commit | f601674d59e8654c29eae8863df6871ca5e3ac83 (patch) | |
tree | bcaaecc2d77a5fe3279879b9ff916982b79bb479 | |
parent | 06d1cc8df2db944d8ae674ce9af6e1155d0de25e (diff) | |
download | gatekeeper-f601674d59e8654c29eae8863df6871ca5e3ac83.zip gatekeeper-f601674d59e8654c29eae8863df6871ca5e3ac83.tar.gz gatekeeper-f601674d59e8654c29eae8863df6871ca5e3ac83.tar.bz2 |
adding unique index on policies.name column
-rw-r--r-- | migrations/20150528223137_create_policy_table.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migrations/20150528223137_create_policy_table.php b/migrations/20150528223137_create_policy_table.php index c857573..07cdaee 100644 --- a/migrations/20150528223137_create_policy_table.php +++ b/migrations/20150528223137_create_policy_table.php @@ -17,6 +17,8 @@ class CreatePolicyTable extends \Psecio\Gatekeeper\PhinxMigration ->addColumn('created', 'datetime') ->addColumn('updated', 'datetime', array('default' => null)) ->save(); + + $this->execute('create unique index policy_name on '.$this->getPrefix().'policies(name)'); } /** |