teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

修正

2021/12/19 07:41

投稿

yukimidaihuku
yukimidaihuku

スコア3

title CHANGED
File without changes
body CHANGED
@@ -22,11 +22,11 @@
22
22
  +21 vendor frames
23
23
  22 database/migrations/2021_07_12_100400_change_quest_items_table_column_item_id.php:18 Illuminate\Support\Facades\Facade::__callStatic("table")
24
24
  +25 vendor frames 48 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))```
25
-
25
+ ```
26
26
  ### 該当のソースコード
27
27
  エラー文が指しているファイル
28
28
 
29
- ```ここに言語名を入力
29
+ ```
30
30
  <?php
31
31
 
32
32
  use Illuminate\Database\Migrations\Migration;

2

修正

2021/12/19 07:41

投稿

yukimidaihuku
yukimidaihuku

スコア3

title CHANGED
File without changes
body CHANGED
@@ -8,9 +8,8 @@
8
8
  しかし、確認しても見つからなかったので、エラーが発生しているファイルを消して、createしたファイルを修正して再度マイグレーションを実行したのですが、削除したファイルの1コ後のファイルで、全く同じエラーが発生してしまいました。
9
9
 
10
10
  ```
11
- An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error
11
+ Doctrine\DBAL\Exception\SyntaxErrorException An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error
12
-
13
- at vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php:71
12
+ at vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php:71
14
13
  67▕ return new NonUniqueFieldNameException($exception, $query);
15
14
  68▕ }
16
15
  69▕
@@ -20,12 +19,10 @@
20
19
  73▕
21
20
  74▕ if (strpos($exception->getMessage(), 'attempt to write a readonly database') !== false) {
22
21
  75▕ return new ReadOnlyException($exception, $query);
22
+ +21 vendor frames
23
+ 22 database/migrations/2021_07_12_100400_change_quest_items_table_column_item_id.php:18 Illuminate\Support\Facades\Facade::__callStatic("table")
24
+ +25 vendor frames 48 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))```
23
25
 
24
-
25
- database/migrations/2021_07_12_100400_change_quest_items_table_column_item_id.php:18
26
- artisan:37
27
- ```
28
-
29
26
  ### 該当のソースコード
30
27
  エラー文が指しているファイル
31
28
 

1

情報追加

2021/12/15 16:29

投稿

yukimidaihuku
yukimidaihuku

スコア3

title CHANGED
File without changes
body CHANGED
@@ -10,8 +10,18 @@
10
10
  ```
11
11
  An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error
12
12
 
13
+ at vendor/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php:71
14
+ 67▕ return new NonUniqueFieldNameException($exception, $query);
13
- //中略
15
+ 68▕ }
16
+ 69▕
17
+ 70▕ if (strpos($exception->getMessage(), 'syntax error') !== false) {
18
+ ➜ 71▕ return new SyntaxErrorException($exception, $query);
19
+ 72▕ }
20
+ 73▕
21
+ 74▕ if (strpos($exception->getMessage(), 'attempt to write a readonly database') !== false) {
22
+ 75▕ return new ReadOnlyException($exception, $query);
14
23
 
24
+
15
25
  database/migrations/2021_07_12_100400_change_quest_items_table_column_item_id.php:18
16
26
  artisan:37
17
27
  ```