Skip to content

Conversation

@gptjddldi
Copy link

Hi, this is my first time contributing to an open-source project. I might be missing something, so please let me know if anything looks wrong — I’ll be happy to fix it right away.

In your documentation (specifically, the intro and run-db2rest-on-docker), the MySQL table creation syntax seemed different from the PostgreSQL example provided earlier. I updated the MySQL example to make it consistent.

The original MySQL example was:

CREATE TABLE `employee` (
  `emp_id` int unsigned NOT NULL AUTO_INCREMENT,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(150) NOT NULL,
  `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`emp_id`)
);

When using this syntax, the following request failed.:
image

To resolve the issue, I modified the table definition as below:

CREATE TABLE employee (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(50) NOT NULL,
    last_name VARCHAR(50) NOT NULL,
    email VARCHAR(255) NOT NULL UNIQUE,
    created_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant