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

Automatically check server version for proper schema generation strategy #25

Merged
merged 3 commits into from Mar 7, 2018

Conversation

2 participants
@SandorDobi
Copy link
Contributor

SandorDobi commented Mar 7, 2018

The FluentPostgreSQLProvider now automatically checking the server version and if it less than 10 it is disabling the IDENTITY COLUMN generation.

@tanner0101 tanner0101 changed the base branch from master to nio Mar 7, 2018

/// dirty workaround for missing pre migration hook
public final class PostgreSQLVersionCheckProvider: Provider {
/// See `Provider.repositoryName`
public static let repositoryName = "fluent-postgresql-versioncheck"

This comment has been minimized.

@tanner0101

tanner0101 Mar 7, 2018

Member

this should be fluent-postgresql (name of the gh repo)

This comment has been minimized.

@SandorDobi

SandorDobi Mar 7, 2018

Author Contributor

Done.
I didn't know why this used, I thougt some directory identifier.

@tanner0101
Copy link
Member

tanner0101 left a comment

once repo name is changed, this LGTM. the static nature of this solution may become a problem if someone is using a v10 and v9 server at the same time, but it will not be a huge pain to fix that if we need to. thanks!

@tanner0101 tanner0101 added this to the 1.0.0-rc.2 milestone Mar 7, 2018

@tanner0101 tanner0101 self-assigned this Mar 7, 2018

@tanner0101 tanner0101 merged commit 6019b64 into vapor:nio Mar 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment