https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
n

Nacho Ruiz Martin

11/20/2023, 12:36 PM
I have defined a table as
NOT NULL
in the past and now I’m altering it within a migration with:
Copy code
ALTER TABLE X
    ALTER COLUMN Y DROP NOT NULL;
I have
deriveSchemaFromMigrations.set(true)
in my gradle file. Still, the generated data class and inserts are not marking those fields as nullable. I have tried to run
generateDatabaseInterface
with no luck. This is PostgreSQL, btw. Any idea why this could be happening? 🙇
Adding a new column either as nullable or not nullable works as expected.