diff --git a/.github/workflows/gradle-ci.yml b/.github/workflows/gradle-ci.yml index ce4f6dd..4030502 100644 --- a/.github/workflows/gradle-ci.yml +++ b/.github/workflows/gradle-ci.yml @@ -46,7 +46,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 16 - name: semantic-release run: | npm install -g semantic-release @semantic-release/exec diff --git a/src/main/java/org/casbin/adapter/DB2Adapter.java b/src/main/java/org/casbin/adapter/DB2Adapter.java index 945e691..fe5afea 100644 --- a/src/main/java/org/casbin/adapter/DB2Adapter.java +++ b/src/main/java/org/casbin/adapter/DB2Adapter.java @@ -13,17 +13,18 @@ public class DB2Adapter extends JdbcAdapter { private static final String CHECK_TABLE_SQL = "select 1 from syscat.tables where tabname = upper('CASBIN_RULE')"; - private final static String DROP_TABLE_SQL = "DROP TABLE CASBIN_RULE"; + private static final String DROP_TABLE_SQL = "DROP TABLE CASBIN_RULE"; private static final String INIT_TABLE_SQL = "CREATE TABLE CASBIN_RULE (" + - " ID int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, "+ + " ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1) ,"+ " PTYPE VARCHAR(255) NOT NULL ," + " V0 VARCHAR(255) DEFAULT NULL ," + " V1 VARCHAR(255) DEFAULT NULL ," + " V2 VARCHAR(255) DEFAULT NULL ," + " V3 VARCHAR(255) DEFAULT NULL ," + " V4 VARCHAR(255) DEFAULT NULL ," + - " V5 VARCHAR(255) DEFAULT NULL" + + " V5 VARCHAR(255) DEFAULT NULL ," + + " PRIMARY KEY (ID) " + ")"; /**