mysql CURRENT_TIMESTAMP not support
- Dominant language
- JavaScript
- Stars
- 3.7k
- Forks
- 233
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
I use this def:
```sh
Table group_log {
id int [pk, not null, increment]
add_time timestamp [not null, default: `CURRENT_TIMESTAMP`]
}
```
create this SQL for mysql:
```sql
CREATE TABLE `group_log` (
`id` bigint PRIMARY KEY NOT NULL AUTO_INCREMENT,
`add_time` timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
);
```
get this error:
```sh
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(CURRENT_TIMESTAMP),
)' at line 3
```
try with this:
```sh
default: `CURRENT_TIMESTAMP`
```
generate this: ` add_time timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP())`, also not work for MYSQL
Contributor guide
Assessment
This issue has not been assessed yet.