Replies: 2 comments 2 replies
-
I think this was discussed in the Slack channel, and the conclusion was it would not be ideal. Since migrations / create statements are a snapshot of history, how would this work if you delete a column, or change a column's name. |
Beta Was this translation helpful? Give feedback.
-
Hi @tevelee, we don't have any docs on this, but we probably should. In our view, table definitions, indices, triggers, etc., should all be created with SQL strings (you can even use our And we also feel that the chance of typos in table definitions is pretty low. It's far more obvious when a table definition is wrong than when a query is wrong since it's most likely the very first thing that executes when your app starts. And further, table definitions do not allow for bindings, and so there's no risk of SQL injection (though |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I was wondering whether you have plans to support CREATE TABLE statements as well. I see a bunch of use-cases in pointfreeco/sharing-grdb#34 where the SQL is typed manually with the new
#sql
macro.It seems to me that every necessary piece of information is available on the
Columns
type generated by the@Table
macro for this statement to be supported.Beta Was this translation helpful? Give feedback.
All reactions