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

Consider colons as a token separator #23

Merged
merged 1 commit into from May 24, 2013
Merged

Conversation

@pmalouin
Copy link
Contributor

@pmalouin pmalouin commented May 10, 2013

I bumped into tokenization problems on PostgreSQL with statements of the form:
CREATE TABLE base_table (
base_table_id integer DEFAULT nextval('base_table_seq'::regclass) NOT NULL
);
The parser considers "'base_table_seq'::regclass" to be a full token, but it should be considered as 2 tokens:
"'base_catalog_table_seq'" and "regclass"

Now I haven't tested this with other rdbms and I'm not sure this should be applied to all of them.

I bumped into tokenization problems on PostgreSQL with statements of the form:
CREATE TABLE base_table (
    base_table_id integer DEFAULT nextval('base_table_seq'::regclass) NOT NULL
);
The parser considers "'base_table_seq'::regclass" to be a full token, but it should be considered as 2 tokens:
"'base_catalog_table_seq'" and "regclass"

Now I haven't tested this with other rdbms and I'm not sure this should be applied to all of them.
axelfontaine added a commit that referenced this pull request May 24, 2013
Consider colons as a token separator
@axelfontaine axelfontaine merged commit 3e9dec0 into flyway:master May 24, 2013
1 check passed
1 check passed
default The Travis CI build passed
Details
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented May 24, 2013

Hi Patrick,

thanks for contributing this! One small thing: could you also include a test case in future pull requests? It makes it so much easier to validate things.

I've added you to the hall of fame: http://flywaydb.org/contribute/hallOfFame.html

Cheers
Axel

@pmalouin pmalouin deleted the pmalouin:patch-1 branch May 24, 2013
@pmalouin
Copy link
Contributor Author

@pmalouin pmalouin commented May 24, 2013

Hi Axel,
Thanks! I will add tests next time!
Patrick

@pmalouin
Copy link
Contributor Author

@pmalouin pmalouin commented Jun 21, 2013

Hi Axel,
We're planning on migrating a big PostgreSQL project to Flyway, and this fix is necessary for us (100s of scripts with that syntax). I'd prefer not building from source and have an official release before we begin our work.
When do you expect to have a new official build for Flyway?
Thanks!

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jun 21, 2013

Hi Patrick,

I am aiming for a 2.2 release by the end of next week, give or take a few days.

Cheers
Axel

@pmalouin
Copy link
Contributor Author

@pmalouin pmalouin commented Jun 21, 2013

That's great!
Patrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.