djrobstep / migra

Like diff but for PostgreSQL schemas
https://databaseci.com/docs/migra
The Unlicense
2.92k stars 125 forks source link

Migra does not detect/support composite types #94

Open autumnjolitz opened 5 years ago

autumnjolitz commented 5 years ago

Example:

Initialize a database with this type:

CREATE TYPE test_type AS (foo TEXT, bar TEXT);

Compare to a database without that type.

Expectation: Migra detects the missing type and runs a CREATE TYPE ... AS

What actually happens: It sees no difference between databases.

I've resorted to pre-creating the composite types in question before running a comparison.

djrobstep commented 5 years ago

Thanks for filing this, I appreciate it!

I have an implementation in progress to fix this. Given my current schedule, it may take a bunch more time, however!

emmanuel commented 4 years ago

@djrobstep I am also interested in support for composite types in migra. Is your in-progress work something that I could use as a starting point to implement this myself? If so, would you mind pushing that branch to Github? (or did I perchance miss it?)

kchaliki commented 3 years ago

Curious as to what the plan is here?

bard commented 3 years ago

The support table at https://databaseci.com/docs/migra says "custom types/domains - Basic support (drop-and-create only, no alter)" but I'm also not seeing types in the generated migrations.