- Notifications
You must be signed in to change notification settings - Fork 955
Open
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
1.24.0
What happened?
I created an inherited table in Postgres and everything worked as expected.
Then I decided I needed to add a column to the parent table, but when I did this the models for the inherited tables did not get updated with the new column.
Relevant log output
No response
Database schema
CREATE TABLE traffic_sensors( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), serial_number varchar(16) NOT NULL, sampling_rate interval NOT NULL, base_station_serial varchar NOT NULL ); CREATE TABLE traffic_sensors_random( max integer NOT NULL, min integer NOT NULL ) INHERITS ( traffic_sensors ); ALTER TABLE traffic_sensors ADD sensor_type varchar;
SQL queries
SELECT * FROM traffic_sensors_random;
Configuration
version: "2" sql: - engine: "postgresql" queries: "sql/queries" schema: "sql/migrations" gen: go: package: "persist" out: "persist" emit_interface: true overrides: go: overrides: - db_type: "pg_catalog.interval" engine: "postgresql" go_type: import: "github.com/jackc/pgtype" type: "Interval"
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed