This repository was archived by the owner on Mar 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 8
8
box.json export-ignore
9
9
phpunit.xml.dist export-ignore
10
10
pint.json export-ignore
11
+
12
+
13
+ tests /fixtures /down-migration /line-endings * .php eol =crlf
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public function it_replaces_string_references_to_classes()
43
43
$ this ->fakeProject ([
44
44
'database/migrations/basic_migration.php ' => 'tests/fixtures/down-migration/simple.php ' ,
45
45
'database/migrations/complex_migration.php ' => 'tests/fixtures/down-migration/complex.php ' ,
46
+ 'database/migrations/windows_migration.php ' => 'tests/fixtures/down-migration/line-endings.php ' ,
46
47
]);
47
48
48
49
$ result = $ this ->subject ->perform ();
@@ -51,5 +52,6 @@ public function it_replaces_string_references_to_classes()
51
52
52
53
$ this ->assertFileChanges ('tests/fixtures/down-migration/simple.after.php ' , 'database/migrations/basic_migration.php ' );
53
54
$ this ->assertFileChanges ('tests/fixtures/down-migration/complex.after.php ' , 'database/migrations/complex_migration.php ' );
55
+ $ this ->assertFileChanges ('tests/fixtures/down-migration/line-endings.after.php ' , 'database/migrations/windows_migration.php ' );
54
56
}
55
57
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Database \Migrations \Migration ;
4
+ use Illuminate \Database \Schema \Blueprint ;
5
+ use Illuminate \Support \Facades \Schema ;
6
+
7
+ class SimpleMigration extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up ()
15
+ {
16
+ Schema::table ('videos ' , function (Blueprint $ table ) {
17
+ $ table ->integer ('runtime ' )->nullable ();
18
+ });
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Database \Migrations \Migration ;
4
+ use Illuminate \Database \Schema \Blueprint ;
5
+ use Illuminate \Support \Facades \Schema ;
6
+
7
+ class SimpleMigration extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up ()
15
+ {
16
+ Schema::table ('videos ' , function (Blueprint $ table ) {
17
+ $ table ->integer ('runtime ' )->nullable ();
18
+ });
19
+ }
20
+
21
+ /**
22
+ * Reverse the migrations.
23
+ *
24
+ * @return void
25
+ */
26
+ public function down ()
27
+ {
28
+ Schema::table ('videos ' , function (Blueprint $ table ) {
29
+ $ table ->dropColumn ('runtime ' );
30
+ });
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments