Я использую rolify gem с devise для аутентификации и авторизации. Я использую Mysql, и мне нужно перейти на оракул. У меня есть таблицы DIM_USER
, DIM_ROLE
и ROLE_USER_MAP
, чьи DDLS следующие:
DIM_USER
CREATE TABLE "CUSTOMERPORTAL"."DIM_USER"
( "USER_ID" NUMBER(10,0) NOT NULL ENABLE,
"EMAIL" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"ENCRYPTED_PASSWORD" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"FIRST_NAME" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"PHONE" VARCHAR2(255 CHAR),
"RESET_PASSWORD_TOKEN" VARCHAR2(255 CHAR),
"RESET_PASSWORD_SENT_AT" DATE,
"REMEMBER_CREATED_AT" DATE,
"SIGN_IN_COUNT" NUMBER(10,0),
"CURRENT_SIGN_IN_AT_TIMESTAMP" DATE,
"LAST_SIGN_IN_AT_TIMESTAMP" DATE,
"CURRENT_SIGN_IN_IP" VARCHAR2(255 CHAR),
"LAST_SIGN_IN_IP" VARCHAR2(255 CHAR),
"CREATED_AT" DATE,
"UPDATED_AT" DATE,
"TIME_ZONE" VARCHAR2(255 CHAR),
"LOCALE_CODE" VARCHAR2(255 CHAR),
"FULL_NAME" VARCHAR2(255 CHAR),
"LAST_NAME" VARCHAR2(255 CHAR),
"ACTIVE" NUMBER(10,0),
"SLUG" VARCHAR2(255 CHAR),
"CLEAN_UP_FLAG" NUMBER(10,0),
"COMPANY_NAME" VARCHAR2(255 CHAR),
"FAILED_ATTEMPTS" NUMBER(10,0),
"UNLOCK_TOKEN" VARCHAR2(255 CHAR),
"LOCKED_AT_TIMESTAMP" DATE,
"EMAIL_VERIFICATION_TOKEN" VARCHAR2(255 CHAR),
"EMAIL_VERIFICATION_STATUS_FLAG" NUMBER(10,0),
"IS_AUTO_PROVISIONED_USER" NUMBER(10,0),
"ROLE_NAME" VARCHAR2(40 BYTE),
CONSTRAINT "DIM_USER_PK" PRIMARY KEY ("USER_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
)
DIM_ROLE
CREATE TABLE "CUSTOMERPORTAL"."DIM_ROLE"
( "ROLE_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
"ROLE_DESCRIPTION" VARCHAR2(256 BYTE),
"CREATE_TIMESTAMP" TIMESTAMP (6) NOT NULL ENABLE,
"UPDATE_TIMESTAMP" TIMESTAMP (6) NOT NULL ENABLE
CONSTRAINT "DIM_ROLE_PK" PRIMARY KEY ("ROLE_NAME")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
)
ROLE_USER_MAP
CREATE TABLE "CUSTOMERPORTAL"."ROLE_USER_MAP"
( "USER_ID" NUMBER(11,0) NOT NULL ENABLE,
"CREATE_TIMESTAMP" TIMESTAMP (6) NOT NULL ENABLE,
"UPDATE_TIMESTAMP" TIMESTAMP (6) NOT NULL ENABLE,
"ROLE_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
CONSTRAINT "ROLE_USER_MAP_FK1" FOREIGN KEY ("ROLE_NAME")
REFERENCES "CUSTOMERPORTAL"."DIM_ROLE" ("ROLE_NAME") ENABLE,
CONSTRAINT "ROLE_USER_MAP_FK2" FOREIGN KEY ("USER_ID")
REFERENCES "CUSTOMERPORTAL"."DIM_USER" ("USER_ID") ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
Совместим ли rolify gem с этими новыми таблицами и столбцами? Если да, есть ли способ переопределить и настроить методы rolify в сборке?