sqldelight / sqldelight/sql-psi

MySQL complaining about UNSIGNED type

Open
#310 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
104
Forks
35
Avg merge
1h 11m
Merged PRs (30d)
14

Description

Dialect

MySQL

Failing SQL
CREATE TABLE Permissions (
    id INTEGER AUTO_INCREMENT PRIMARY KEY,
    userId VARCHAR(32) NOT NULL,
    type UNSIGNED TINYINT NOT NULL,
    FOREIGN KEY (userId) REFERENCES Users(id),
    INDEX(userId)
);
Description

I'm getting an IDE error for the above SQL. It doesn't seem to like my use of UNSIGNED.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported IDE error with the MySQL CREATE TABLE statement in the issue and trace how the MySQL dialect handles UNSIGNED. Done means valid UNSIGNED syntax is no longer reported as an error while invalid syntax remains diagnosed.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.