spring-security/hsqldb/acegisecurity.script

85 lines
4.3 KiB
Plaintext

SET IGNORECASE TRUE
CREATE TABLE USERS(USERNAME VARCHAR(50) NOT NULL PRIMARY KEY,PASSWORD VARCHAR(50) NOT NULL,ENABLED BIT NOT NULL)
CREATE TABLE AUTHORITIES(USERNAME VARCHAR(50) NOT NULL,AUTHORITY VARCHAR(50) NOT NULL,CONSTRAINT FK_AUTHORITIES_USERS FOREIGN KEY(USERNAME) REFERENCES USERS(USERNAME))
CREATE UNIQUE INDEX IX_AUTH_USERNAME ON AUTHORITIES(USERNAME,AUTHORITY)
GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC
GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC
CREATE USER SA PASSWORD "" ADMIN
CREATE ALIAS DAYNAME FOR "org.hsqldb.Library.dayname"
CREATE ALIAS SPACE FOR "org.hsqldb.Library.space"
CREATE ALIAS SUBSTRING FOR "org.hsqldb.Library.substring"
CREATE ALIAS HEXTORAW FOR "org.hsqldb.Library.hexToRaw"
CREATE ALIAS SQRT FOR "java.lang.Math.sqrt"
CREATE ALIAS ABS FOR "org.hsqldb.Library.abs"
CREATE ALIAS POWER FOR "java.lang.Math.pow"
CREATE ALIAS CHAR FOR "org.hsqldb.Library.character"
CREATE ALIAS CONCAT FOR "org.hsqldb.Library.concat"
CREATE ALIAS PI FOR "org.hsqldb.Library.pi"
CREATE ALIAS RAWTOHEX FOR "org.hsqldb.Library.rawToHex"
CREATE ALIAS SECOND FOR "org.hsqldb.Library.second"
CREATE ALIAS TRUNCATE FOR "org.hsqldb.Library.truncate"
CREATE ALIAS MONTH FOR "org.hsqldb.Library.month"
CREATE ALIAS LOWER FOR "org.hsqldb.Library.lcase"
CREATE ALIAS ATAN2 FOR "java.lang.Math.atan2"
CREATE ALIAS REPEAT FOR "org.hsqldb.Library.repeat"
CREATE ALIAS DAYOFMONTH FOR "org.hsqldb.Library.dayofmonth"
CREATE ALIAS TAN FOR "java.lang.Math.tan"
CREATE ALIAS RADIANS FOR "java.lang.Math.toRadians"
CREATE ALIAS FLOOR FOR "java.lang.Math.floor"
CREATE ALIAS NOW FOR "org.hsqldb.Library.now"
CREATE ALIAS ACOS FOR "java.lang.Math.acos"
CREATE ALIAS DAYOFWEEK FOR "org.hsqldb.Library.dayofweek"
CREATE ALIAS CEILING FOR "java.lang.Math.ceil"
CREATE ALIAS DAYOFYEAR FOR "org.hsqldb.Library.dayofyear"
CREATE ALIAS LCASE FOR "org.hsqldb.Library.lcase"
CREATE ALIAS WEEK FOR "org.hsqldb.Library.week"
CREATE ALIAS SOUNDEX FOR "org.hsqldb.Library.soundex"
CREATE ALIAS ASIN FOR "java.lang.Math.asin"
CREATE ALIAS LOCATE FOR "org.hsqldb.Library.locate"
CREATE ALIAS EXP FOR "java.lang.Math.exp"
CREATE ALIAS MONTHNAME FOR "org.hsqldb.Library.monthname"
CREATE ALIAS YEAR FOR "org.hsqldb.Library.year"
CREATE ALIAS LEFT FOR "org.hsqldb.Library.left"
CREATE ALIAS ROUNDMAGIC FOR "org.hsqldb.Library.roundMagic"
CREATE ALIAS BITOR FOR "org.hsqldb.Library.bitor"
CREATE ALIAS LTRIM FOR "org.hsqldb.Library.ltrim"
CREATE ALIAS COT FOR "org.hsqldb.Library.cot"
CREATE ALIAS COS FOR "java.lang.Math.cos"
CREATE ALIAS MOD FOR "org.hsqldb.Library.mod"
CREATE ALIAS SIGN FOR "org.hsqldb.Library.sign"
CREATE ALIAS DEGREES FOR "java.lang.Math.toDegrees"
CREATE ALIAS LOG FOR "java.lang.Math.log"
CREATE ALIAS SIN FOR "java.lang.Math.sin"
CREATE ALIAS CURTIME FOR "org.hsqldb.Library.curtime"
CREATE ALIAS DIFFERENCE FOR "org.hsqldb.Library.difference"
CREATE ALIAS INSERT FOR "org.hsqldb.Library.insert"
CREATE ALIAS SUBSTR FOR "org.hsqldb.Library.substring"
CREATE ALIAS DATABASE FOR "org.hsqldb.Library.database"
CREATE ALIAS MINUTE FOR "org.hsqldb.Library.minute"
CREATE ALIAS HOUR FOR "org.hsqldb.Library.hour"
CREATE ALIAS IDENTITY FOR "org.hsqldb.Library.identity"
CREATE ALIAS QUARTER FOR "org.hsqldb.Library.quarter"
CREATE ALIAS CURDATE FOR "org.hsqldb.Library.curdate"
CREATE ALIAS BITAND FOR "org.hsqldb.Library.bitand"
CREATE ALIAS USER FOR "org.hsqldb.Library.user"
CREATE ALIAS UCASE FOR "org.hsqldb.Library.ucase"
CREATE ALIAS RTRIM FOR "org.hsqldb.Library.rtrim"
CREATE ALIAS LOG10 FOR "org.hsqldb.Library.log10"
CREATE ALIAS RIGHT FOR "org.hsqldb.Library.right"
CREATE ALIAS ATAN FOR "java.lang.Math.atan"
CREATE ALIAS UPPER FOR "org.hsqldb.Library.ucase"
CREATE ALIAS ASCII FOR "org.hsqldb.Library.ascii"
CREATE ALIAS RAND FOR "java.lang.Math.random"
CREATE ALIAS LENGTH FOR "org.hsqldb.Library.length"
CREATE ALIAS ROUND FOR "org.hsqldb.Library.round"
CREATE ALIAS REPLACE FOR "org.hsqldb.Library.replace"
INSERT INTO USERS VALUES('dianne','emu',true)
INSERT INTO USERS VALUES('marissa','koala',true)
INSERT INTO USERS VALUES('peter','opal',false)
INSERT INTO USERS VALUES('scott','wombat',true)
INSERT INTO AUTHORITIES VALUES('marissa','ROLE_TELLER')
INSERT INTO AUTHORITIES VALUES('marissa','ROLE_SUPERVISOR')
INSERT INTO AUTHORITIES VALUES('dianne','ROLE_TELLER')
INSERT INTO AUTHORITIES VALUES('scott','ROLE_TELLER')
INSERT INTO AUTHORITIES VALUES('peter','ROLE_TELLER')