From 235266ec53f620d94a080ed7ae8e77eaef6dbb3c Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 16 Jan 2018 21:26:59 +0100 Subject: Added basic database migration functionality --- .../2001_04_11_123456_create_lorem_ipsum_table.php | 27 ++++++++++++++++++++++ .../Stub/2017_12_24_053300_another_stuff.php | 22 ++++++++++++++++++ .../Stub/2022_12_22_221222_add_some_feature.php | 22 ++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 tests/Unit/Database/Migration/Stub/2001_04_11_123456_create_lorem_ipsum_table.php create mode 100644 tests/Unit/Database/Migration/Stub/2017_12_24_053300_another_stuff.php create mode 100644 tests/Unit/Database/Migration/Stub/2022_12_22_221222_add_some_feature.php (limited to 'tests/Unit/Database/Migration/Stub') 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 @@ +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 @@ +