Skip to content

GRAILS-8140: Syntax errors in H2 SQL generation #1158

Closed

Description

@graemerocher

Original Reporter: bond
Environment: Grails Build Snapshot: 1477, Ubuntu: 10.04, Java 6
Version: 2.0-M2
Migrated From: http://jira.grails.org/browse/GRAILS-8140

{noformat}
| Error 2011-10-07 00:17:00,907 [Thread-6] ERROR hbm2ddl.SchemaExport - Unsuccessful: create table user (id bigint generated by default as identity, version bigint not null, name varchar(255) not null, today timestamp not null, primary key (id))
| Error 2011-10-07 00:17:00,908 [Thread-6] ERROR hbm2ddl.SchemaExport - Syntax error in SQL statement "CREATE TABLE USER (ID BIGINT GENERATED BY DEFAULT AS IDENTITY, VERSION BIGINT NOT NULL, NAME VARCHAR(255) NOT NULL, TODAY[*] TIMESTAMP NOT NULL, PRIMARY KEY (ID)) "; expected "identifier"; SQL statement:
create table user (id bigint generated by default as identity, version bigint not null, name varchar(255) not null, today timestamp not null, primary key (id)) [42001-147]
| Error 2011-10-07 00:17:00,908 [Thread-6] ERROR hbm2ddl.SchemaExport - Unsuccessful: alter table cases_user add constraint FKF9004B47AE234DD6 foreign key (user_id) references user
| Error 2011-10-07 00:17:00,908 [Thread-6] ERROR hbm2ddl.SchemaExport - Table "USER" not found; SQL statement:
alter table cases_user add constraint FKF9004B47AE234DD6 foreign key (user_id) references user [42102-147]
{noformat}

Activity

  1. graemerocher commented on Oct 6, 2011

    @graemerocher
    ContributorAuthor

    bond said:
    Those errors were available in logs just before the app was about to run. This wasn't the case when running the same code against MySQL

  2. added a commit that references this issue on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions