Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Modeling tables in terraform MySQL #78

Open
andrewpage opened this issue May 21, 2019 · 1 comment
Open

Modeling tables in terraform MySQL #78

andrewpage opened this issue May 21, 2019 · 1 comment

Comments

@andrewpage
Copy link

Hello,

Has the team considered the ability to model tables, columns (data types, comments, defaults, etc), and indexes using resources?

I’ve noticed that neither the MySQL nor Postgres providers support this. I think it would be quite useful to be able to declaratively define a SQL schema and have terraform manage the diffing + migrations.

Is there a technical reason this has not been done? If not, would you be accepting of a PR?

Thanks

@davidji99
Copy link
Contributor

Hi @andrewpage,

It's an interesting idea. I'd imagine this hasn't be done in either DB providers because perhaps application frameworks, say rails with its db:<command> commands, provide a better experience for declaring/migrating tables, columns, indexes, etc? Or perhaps no one has the time to experiment with using terraform to declare a SQL schema and its ramifications in a production level environment?

Would be curious on what scenario(s) you would use terraform to declare your schema over using an application framework? Standalone tables that are used by multiple frameworks perhaps?

I don't know of a technical reason as I haven't embarked on such a path but if you would to submit a PR, go for it!

Is there a technical reason this has not been done? If not, would you be accepting of a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants