summaryrefslogtreecommitdiffstats
path: root/application/migrations
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-02-21 23:24:01 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-02-21 23:24:01 +0100
commit5919c771e9cf3c3edfc62dfb1ac6bddf1cfc9732 (patch)
treec774ace3303c3dd4c232f49136118014271e2ca2 /application/migrations
parentaea9987a38715da82291f87129b1a3047e5c9849 (diff)
Implement multiple access levels for api keys
This allows to use an api key to write a completly standalone client. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/migrations')
-rw-r--r--application/migrations/011_apikeys_add_access_level.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/application/migrations/011_apikeys_add_access_level.php b/application/migrations/011_apikeys_add_access_level.php
new file mode 100644
index 000000000..e0f39317b
--- /dev/null
+++ b/application/migrations/011_apikeys_add_access_level.php
@@ -0,0 +1,19 @@
+<?php
+defined('BASEPATH') OR exit('No direct script access allowed');
+
+class Migration_apikeys_add_access_level extends CI_Migration {
+
+ public function up()
+ {
+ $this->db->query("
+ alter table `apikeys` add `access_level` varchar(255) default 'apikey';
+ ");
+ }
+
+ public function down()
+ {
+ $this->db->query("
+ alter table `apikeys` drop `access_level`;
+ ");
+ }
+}