質問編集履歴
2
文言修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
|
61
61
|
## 中間テーブル
|
62
62
|
|
63
|
-
CREATE TABLE `
|
63
|
+
CREATE TABLE `articles_tags` (
|
64
64
|
|
65
65
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
66
66
|
|
1
create文に変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,9 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
|
23
|
-
|
23
|
+
## 記事テーブル
|
24
|
+
|
25
|
+
CREATE TABLE `articles` (
|
24
26
|
|
25
27
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
26
28
|
|
@@ -32,9 +34,33 @@
|
|
32
34
|
|
33
35
|
`modified` datetime NOT NULL,
|
34
36
|
|
37
|
+
PRIMARY KEY (`id`)
|
38
|
+
|
39
|
+
)
|
35
40
|
|
36
41
|
|
42
|
+
|
43
|
+
## タグテーブル
|
44
|
+
|
45
|
+
CREATE TABLE `tags` (
|
46
|
+
|
47
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
48
|
+
|
49
|
+
`name` varchar(255) NOT NULL,
|
50
|
+
|
51
|
+
`created` datetime NOT NULL,
|
52
|
+
|
53
|
+
`modified` datetime NOT NULL,
|
54
|
+
|
37
|
-
|
55
|
+
PRIMARY KEY (`id`)
|
56
|
+
|
57
|
+
)
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
## 中間テーブル
|
62
|
+
|
63
|
+
CREATE TABLE `products_tags` (
|
38
64
|
|
39
65
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
40
66
|
|
@@ -46,17 +72,9 @@
|
|
46
72
|
|
47
73
|
`modified` datetime NOT NULL,
|
48
74
|
|
75
|
+
PRIMARY KEY (`id`)
|
49
76
|
|
50
|
-
|
51
|
-
|
77
|
+
)
|
52
|
-
|
53
|
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
54
|
-
|
55
|
-
`name` varchar(255) NOT NULL,
|
56
|
-
|
57
|
-
`created` datetime NOT NULL,
|
58
|
-
|
59
|
-
`modified` datetime NOT NULL,
|
60
78
|
|
61
79
|
```
|
62
80
|
|