Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding in extension support #356

Merged
merged 4 commits into from
Apr 27, 2020
Merged

Adding in extension support #356

merged 4 commits into from
Apr 27, 2020

Conversation

jwoertink
Copy link
Member

This PR will be needed to do #122 and #188

This adds in helper methods for enabling and disabling extensions.

enable_extension "uuid-ossp"
disable_extension "uuid-ossp"
update_extension "hstore", to: "2.0"

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good man! Is it ever possible/necessary to pass args when enabling extensions? Like extension options or anything?

Im not sure so if not that’s fine!

src/avram/migrator/alter_extension_statement.cr Outdated Show resolved Hide resolved
Co-Authored-By: Paul Smith <paulcsmith@users.noreply.github.com>
@jwoertink
Copy link
Member Author

There's a few small options you could technically use like specifying the schema if it's not public, or installing an extension from a specific older version, but those seem to be super edge case since we currently don't support schemas outside of public, and I think you can just use the update_extension and specify a different version if you need to roll it back.

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks great! Could you add an issue to website so we remember to document it?

@jwoertink jwoertink merged commit c160ddd into master Apr 27, 2020
@jwoertink jwoertink deleted the features/extensions branch April 27, 2020 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants