Merge branch 'release-2.140.115'
[feisty_meow.git] / production / example_apps / shared_calendar / config / Migrations / 20170725211622_CreateUsers.php
diff --git a/production/example_apps/shared_calendar/config/Migrations/20170725211622_CreateUsers.php b/production/example_apps/shared_calendar/config/Migrations/20170725211622_CreateUsers.php
new file mode 100644 (file)
index 0000000..410e841
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+use Migrations\AbstractMigration;
+
+class CreateUsers extends AbstractMigration
+{
+    /**
+     * Change Method.
+     *
+     * More information on this method is available here:
+     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
+     * @return void
+     */
+    public function change()
+    {
+       $this->table('users', ['id' => false, 'primary_key' => ['id']])
+            ->addColumn('id', 'integer', ['identity' => true, 'signed' => false])
+            ->addColumn('name', 'string', ['length' => 128, 'null' => false])
+            ->addColumn('token', 'string', ['length' => 2048, 'null' => true])
+            ->addColumn('created', 'datetime')
+            ->addColumn('modified', 'datetime')
+            ->addIndex('name')
+            ->create();
+    }
+}