Skip to content

Fix InsertWhitelist test in composite primary key table #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benevolent0505
Copy link

  • The table has a composite primary key with columns that have default values and columns that don't.
  • ColumnsWithoutDefault columns don't guarantee unique records.

What version of SQLBoiler are you using (sqlboiler --version)?

SQLBoiler v4.18.0

What is your database and version (eg. Postgresql 10)

MySQL 8.0.34

Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)

CREATE TABLE IF NOT EXISTS `dummy` (
  `id` INT NOT NULL,

  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

  PRIMARY KEY (`id`, `created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

- The table has a composite primary key with columns that have default
  values and columns that don't.
- ColumnsWithoutDefault columns don't guarantee unique records.
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