Skip to content

Instantly share code, notes, and snippets.

@jamesmorgan
Created November 2, 2011 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmorgan/1333185 to your computer and use it in GitHub Desktop.
Save jamesmorgan/1333185 to your computer and use it in GitHub Desktop.
Initial implementation of a SQL creation builder used for generating SQL migration queries.
String rawSql = new AlterTableBuild()
.alterTable(Person.class)
.addColumn(Person.FOO_ID)
.after(Person.NAME)
.migrate()
.from("old_column")
.to(Person.FOO_ID)
.build();
this.db.executeRaw(rawSql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment