Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These tables are similar to the holiday tables in that there is one table for users, one table for user roles (admin and user), and one table connecting users to their role, however these tables are automatically generated by Grails.  This is because Grails convention is that there is a table for each domain class..

create table user (
  id int not null auto_increment,
  account_expired boolean not null,
  account_locked boolean not null,
  enabled boolean not null,
  password varchar(255) not null,
  password_expired boolean not null,
  username varchar(255) not null,
  unique (username),
  primary key(id)
) Engine=InnoDB;

create table role (
  id int not null auto_increment,
  authority varchar(255) not null,
  unique (authority),
  primary key(id)
) Engine=InnoDB;

create table user_role (
  
  
  
) Engine=InnoDB;