質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -35,3 +35,33 @@
|
|
35
35
|
+---------------+------------------+------+-----+---------+----------------+
|
36
36
|
12 rows in set (0.01 sec)
|
37
37
|
```
|
38
|
+
|
39
|
+
マイグレーションしようと$php artisan migrateをすると下記のようになります
|
40
|
+
|
41
|
+
```ここに言語を入力
|
42
|
+
$ php artisan migrate
|
43
|
+
Migrating: 2022_02_04_164257_create_comics_table
|
44
|
+
|
45
|
+
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned not null, `book_author` varchar(255) unsigned not null, `book_largeI...' at line 1 (SQL: create table `comics` (`id` bigint unsigned not null auto_increment primary key, `book_booksGenreId` int unsigned not null, `book_title` varchar(255) unsigned not null, `book_author` varchar(255) unsigned not null, `book_largeImageUrl` text unsigned not null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
|
46
|
+
|
47
|
+
at /home/ec2-user/environment/book/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
|
48
|
+
665| // If an exception occurs when attempting to run a query, we'll format the error
|
49
|
+
666| // message to include the bindings with SQL, which will make this exception a
|
50
|
+
667| // lot more helpful to the developer instead of just the database's errors.
|
51
|
+
668| catch (Exception $e) {
|
52
|
+
> 669| throw new QueryException(
|
53
|
+
670| $query, $this->prepareBindings($bindings), $e
|
54
|
+
671| );
|
55
|
+
672| }
|
56
|
+
673|
|
57
|
+
|
58
|
+
Exception trace:
|
59
|
+
|
60
|
+
1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned not null, `book_author` varchar(255) unsigned not null, `book_largeI...' at line 1")
|
61
|
+
/home/ec2-user/environment/book/vendor/laravel/framework/src/Illuminate/Database/Connection.php:457
|
62
|
+
|
63
|
+
2 PDO::prepare()
|
64
|
+
/home/ec2-user/environment/book/vendor/laravel/framework/src/Illuminate/Database/Connection.php:457
|
65
|
+
|
66
|
+
Please use the argument -v to see more details.
|
67
|
+
```
|