Closed SebastienMelki closed 11 months ago
1.24.0
(This seems to be happen only with this specific table name)
I have a table called 'raw_bonus' but the generate struct has the name 'RawBonu'. I've attached a screenshot of my sqlc config.
No response
CREATE TABLE raw_bonus ( `raw_bonus_id` int(11) NOT NULL AUTO_INCREMENT, `file_id` int(11) NOT NULL, `start_date_time` datetime NOT NULL, `end_date_time` datetime NOT NULL, `uri_id` varchar(20) NOT NULL, `source_url` varchar(255) DEFAULT NULL, `content_check_sum` varchar(255) DEFAULT NULL, `is_copy_protection` tinyint(1) NOT NULL DEFAULT '0', `bonus_category` varchar(255) DEFAULT NULL, `bonus_material` tinyint(1) NOT NULL DEFAULT '0', `bonus_scope` varchar(255) DEFAULT NULL, `created_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`raw_bonus_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4
- path: "db/dbmodels/osn_ingest" name: "osn_ingestdb" engine: "mysql" schema: "db/dbschemas/osn_ingest" queries: "db/queries/osn_ingest" emit_db_tags: true emit_exported_queries: true
Linux
MySQL
Go
De-pluralization is hard. You should be able to "fix" this with a rename though: https://docs.sqlc.dev/en/latest/howto/rename.html#tables
Version
1.24.0
What happened?
(This seems to be happen only with this specific table name)
I have a table called 'raw_bonus' but the generate struct has the name 'RawBonu'. I've attached a screenshot of my sqlc config.
Relevant log output
No response
Database schema
SQL queries
No response
Configuration
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
MySQL
What type of code are you generating?
Go