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

Soda v4.5.11 Broke Back Quotes in Fizz #148

Closed
emmercm opened this issue Jun 27, 2018 · 2 comments
Closed

Soda v4.5.11 Broke Back Quotes in Fizz #148

emmercm opened this issue Jun 27, 2018 · 2 comments
Assignees

Comments

@emmercm
Copy link

emmercm commented Jun 27, 2018

Example migration file:
20180627164200_back_quotes.up.fizz

raw(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`)

create_table("users", func(t) {
  t.Column("email", "string", {})
  t.Column("twitter_handle", "string", {"size": 50})
  t.Column("age", "integer", {"default": 0})
  t.Column("admin", "bool", {"default": false})
  t.Column("company_id", "uuid", {"default_raw": "uuid_generate_v1()"})
  t.Column("bio", "text", {"null": true})
  t.Column("joined_at", "timestamp", {})
})

raw(`
    INSERT INTO users (email, twitter_handle, joined_at, created_at, updated_at)
    VALUES ('JasonJSalgado@teleworm.us', 'Soman1994', now(), now(), now());
`)

Produces the output:

Error: error processing migrations/20180627164200_back_quotes.up.fizz: could not fizz the migration migrations/20180627164200_back_quotes.up.fizz: line 11: no prefix parse function for ILLEGAL found
line 11: expected next token to be ), got IDENT instead
line 12: no prefix parse function for ILLEGAL found
line 12: expected next token to be ), got IDENT instead
line 12: no prefix parse function for ILLEGAL found
line 12: no prefix parse function for ILLEGAL found
line 12: no prefix parse function for , found
line 12: no prefix parse function for ILLEGAL found
line 12: no prefix parse function for ILLEGAL found
line 12: no prefix parse function for , found
line 12: no prefix parse function for , found
line 12: no prefix parse function for , found
line 12: no prefix parse function for ) found
line 13: no prefix parse function for ILLEGAL found
line 14: no prefix parse function for ) found

While this was valid in v4.5.10 and before.

markbates added a commit to gobuffalo/fizz that referenced this issue Jun 27, 2018
@markbates markbates self-assigned this Jun 27, 2018
@emmercm
Copy link
Author

emmercm commented Jul 5, 2018

Updated issue comment with Postgres-specific extension installation so uuid_generate_v1() exists on a clean install.

That update causes an error:

error processing migrations/20180627164200_back_quotes.up.fizz: could not fizz the migration migrations/20180627164200_back_quotes.up.fizz: line 1: expected next token to be ), got IDENT instead
line 2: no prefix parse function for ) found

Potentially unrelated, happy to open a new issue.

@u007
Copy link
Member

u007 commented Jul 11, 2018

i think i got the same issue here:
#168

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

No branches or pull requests

3 participants