CREATE TABLE "permissions" ( "id" int PRIMARY KEY, "name" varchar(255) ); CREATE TABLE "users_roles" ( "users_id" int FOREIGN KEY("users_id") REFERENCES "users" ("id"), "roles_id" int FOREIGN KEY("roles_id") REFERENCES "roles" ("id"), "" varchar(255) ); CREATE TABLE "roles" ( "id" int PRIMARY KEY, "name" varchar(255) ); CREATE TABLE "roles_permissions" ( "roles_id" int FOREIGN KEY("roles_id") REFERENCES "roles" ("id"), "permissions_id" int FOREIGN KEY("permissions_id") REFERENCES "permissions" ("id") ); CREATE TABLE "users" ( "id" int PRIMARY KEY, "name" varchar(255) );