﻿CREATE TABLE `auth_group_permissions` (
  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  `group_id` INT(11) NOT NULL,
  `permission_id` INT(11) NOT NULL,
  PRIMARY KEY (id)
)
ENGINE = INNODB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_general_ci,
ROW_FORMAT = DYNAMIC;

ALTER TABLE `auth_group_permissions` 
  ADD UNIQUE INDEX auth_group_permissions_group_id_permission_id_0cd325b0_uniq(group_id, permission_id);

ALTER TABLE `auth_group_permissions` 
  ADD CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (permission_id)
    REFERENCES auth_permission(id);

ALTER TABLE `auth_group_permissions` 
  ADD CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (group_id)
    REFERENCES auth_group(id);