I have two advices
- Dominant language
- JavaScript
- Stars
- 39.5k
- Forks
- 3.2k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 16
Description
During my trial process, I found the following issues:
1. Comments for fields and tables should not be presented in the form of '--'. It is recommended to use the 'comment' keyword instead.
2. When creating tables in MySQL or MariaDB, it should be allowed to specify the character set encoding and storage engine at the end of the CREATE TABLE statement.
before:
```
/* alipay order */
CREATE OR REPLACE TABLE `alipay_bill` (
-- table's primary key
`id` INTEGER NOT NULL AUTO_INCREMENT UNIQUE,
-- alipay order id
`alipay_order_id` VARCHAR NOT NULL UNIQUE,
`my_order_id` INTEGER NOT NULL,
PRIMARY KEY(`id`, `alipay_order_id`)
);
```
what i want is:
```
CREATE OR REPLACE TABLE `alipay_bill` (
`id` INTEGER NOT NULL AUTO_INCREMENT UNIQUE COMMENT 'table's primary key',
`alipay_order_id` VARCHAR NOT NULL UNIQUE COMMENT 'alipay's order id',
`my_order_id` INTEGER NOT NULL,
PRIMARY KEY(`id`, `alipay_order_id`)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci
COMMENT='alipay order';
```
Contributor guide
Assessment
This issue has not been assessed yet.