17 lines
465 B
Markdown
17 lines
465 B
Markdown
### DDL 创建
|
|
```sql
|
|
CREATE TABLE agent_enterprise_relation
|
|
(
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
agent_id INT NOT NULL,
|
|
ent_id INT NOT NULL,
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
UNIQUE KEY idx_agent_ent (agent_id, ent_id)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
```
|
|
|
|
### DDL修改
|
|
```sql
|
|
|
|
``` |