Skip to content

Fix doc's mysql create table statement. - #92

Open
gptjddldi wants to merge 1 commit into
9tigerio:masterfrom
gptjddldi:fix-mysql-create-table-statement
Open

Fix doc's mysql create table statement.#92
gptjddldi wants to merge 1 commit into
9tigerio:masterfrom
gptjddldi:fix-mysql-create-table-statement

Conversation

@gptjddldi

Copy link
Copy Markdown

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
);

@kdhrubo

kdhrubo commented Dec 25, 2025

Copy link
Copy Markdown
Collaborator

@gptjddldi - There is merge conflict please review and fix. Thanks for your contribution we are happy to accept your submission.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation’s MySQL employee table DDL to match the schema that the rest of the “Getting Started” examples use (notably the id, email, and created_on fields referenced in the sample API requests/responses).

Changes:

  • Replaced the MySQL CREATE TABLE employee example to use id as the primary key and include email + created_on.
  • Applied the same MySQL DDL update consistently in both the intro and Docker quickstart docs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/run-db2rest-on-docker.md Updates the MySQL table creation snippet to align with the schema used in the walkthrough API examples.
docs/intro.mdx Updates the MySQL table creation snippet to match the PostgreSQL schema and the subsequent request/response examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants