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

質問編集履歴

1

create 追加

2020/09/04 08:02

投稿

shima3
shima3

スコア5

title CHANGED
File without changes
body CHANGED
@@ -34,7 +34,31 @@
34
34
  $product->where($condition);
35
35
  ```
36
36
 
37
+ ### テーブル情報
37
38
 
39
+ ```sql
40
+ create table tags (
41
+ id INT AUTO_INCREMENT PRIMARY KEY,
42
+ product_id int not null,
43
+ position datetime default null,
44
+ name varchar(20) default null,
45
+ note1 text default null,
46
+ memo text default null,
47
+ created DATETIME default null,
48
+ FOREIGN KEY product_key (product_id) REFERENCES products(id)
49
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
50
+
51
+ CREATE TABLE products (
52
+ id INT AUTO_INCREMENT PRIMARY KEY,
53
+ field01 varchar(20) default NULL,
54
+ code VARCHAR(50) NOT NULL,
55
+ item varchar(255) default null,
56
+ memo text default null,
57
+ created DATETIME default null
58
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
59
+ ```
60
+
61
+
38
62
  ### 補足情報
39
63
  cakephp4
40
64
  php7.2