-
-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
The code generator should fail if datamodel contains reserved fields.
There is a collision with the way the code is constructed, because postgres.Table exposes TalbeName() and the table contains a field named TableName the code does not compile.
Environment (please complete the following information):
- OS: mac os X
- Database: postgres
- Database driver: pgx
- Jet version: master
Code snippet
create schema audit;
drop table if exists audit.audit_actions;
create table audit.audit_actions
(
schema_name text not null,
table_name text not null,
trx_id text default txid_current(),
user_name text,
app_user text,
action TEXT NOT NULL,
old_data jsonb,
new_data jsonb,
query text,
creation_date timestamp with time zone DEFAULT now() NOT NULL
) with (fillfactor=100);
Expected behavior
Generated code to compile successfully or fail hard on the generation and provide context on the reason for the failure
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers