summaryrefslogtreecommitdiff
path: root/tests/Unit/Database/Migration/Stub
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-01-16 21:26:59 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2018-01-16 21:47:21 +0100
commit235266ec53f620d94a080ed7ae8e77eaef6dbb3c (patch)
treea252b862443a3551e761e09338e9bce3ce99c394 /tests/Unit/Database/Migration/Stub
parente44ba8456130fcd0a282ea91b5736d903f8c0496 (diff)
Added basic database migration functionality
Diffstat (limited to 'tests/Unit/Database/Migration/Stub')
-rw-r--r--tests/Unit/Database/Migration/Stub/2001_04_11_123456_create_lorem_ipsum_table.php27
-rw-r--r--tests/Unit/Database/Migration/Stub/2017_12_24_053300_another_stuff.php22
-rw-r--r--tests/Unit/Database/Migration/Stub/2022_12_22_221222_add_some_feature.php22
3 files changed, 71 insertions, 0 deletions
diff --git a/tests/Unit/Database/Migration/Stub/2001_04_11_123456_create_lorem_ipsum_table.php b/tests/Unit/Database/Migration/Stub/2001_04_11_123456_create_lorem_ipsum_table.php
new file mode 100644
index 00000000..0cc89e07
--- /dev/null
+++ b/tests/Unit/Database/Migration/Stub/2001_04_11_123456_create_lorem_ipsum_table.php
@@ -0,0 +1,27 @@
+<?php
+
+use Engelsystem\Database\Migration\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class CreateLoremIpsumTable extends Migration
+{
+ /**
+ * Run the migration
+ */
+ public function up()
+ {
+ $this->schema->create('lorem_ipsum', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('name')->unique();
+ $table->string('email');
+ });
+ }
+
+ /**
+ * Reverse the migration
+ */
+ public function down()
+ {
+ $this->schema->dropIfExists('lorem_ipsum');
+ }
+}
diff --git a/tests/Unit/Database/Migration/Stub/2017_12_24_053300_another_stuff.php b/tests/Unit/Database/Migration/Stub/2017_12_24_053300_another_stuff.php
new file mode 100644
index 00000000..d4d7e5f8
--- /dev/null
+++ b/tests/Unit/Database/Migration/Stub/2017_12_24_053300_another_stuff.php
@@ -0,0 +1,22 @@
+<?php
+
+use Engelsystem\Database\Migration\Migration;
+
+class AnotherStuff extends Migration
+{
+ /**
+ * Run the migration
+ */
+ public function up()
+ {
+ // nope
+ }
+
+ /**
+ * Reverse the migration
+ */
+ public function down()
+ {
+ // nope
+ }
+}
diff --git a/tests/Unit/Database/Migration/Stub/2022_12_22_221222_add_some_feature.php b/tests/Unit/Database/Migration/Stub/2022_12_22_221222_add_some_feature.php
new file mode 100644
index 00000000..cf2762de
--- /dev/null
+++ b/tests/Unit/Database/Migration/Stub/2022_12_22_221222_add_some_feature.php
@@ -0,0 +1,22 @@
+<?php
+
+use Engelsystem\Database\Migration\Migration;
+
+class AddSomeFeature extends Migration
+{
+ /**
+ * Run the migration
+ */
+ public function up()
+ {
+ // nope
+ }
+
+ /**
+ * Reverse the migration
+ */
+ public function down()
+ {
+ // nope
+ }
+}