ALTER TABLE migrations does not update the generated code

Viewed 708

I'm writing a migration file which alters a table, adding a new column, but the generated code isn't updated, so I can't insert new records into the table with value to the new column.

Example:


// BankAccount.sq file
    
CREATE TABLE bank_account (
    id INTEGER PRIMARY KEY,
    bank_code TEXT NOT NULL,
    account_number INTEGER NOT NULL,
    account_digit INTEGER NOT NULL
);

selectALL:
SELECT * FROM bank_account;
    
insert:
INSERT INTO bank_account VALUES (?,?,?,?);

// 1.sqm file
ALTER TABLE bank_account ADD COLUMN bank_name TEXT;

It seems the generated code is not updated after that column is added. For instance, the insert function isn't updated to receive the new added column to the table, and the internal generated Kotlin code isn't updated with the new column.

Is there any way to bypass this issue?

1 Answers
Related