@Test public void testBaseTableWrongFormatWithNoTenantTypeId() throws Exception { // tenantId column of wrong type try { createTestTable( getUrl(), "CREATE TABLE BASE_TABLE5 (TENANT_ID INTEGER NOT NULL, ID VARCHAR, A INTEGER CONSTRAINT PK PRIMARY KEY (TENANT_ID, ID)) MULTI_TENANT=true", null, nextTimestamp()); fail(); } catch (SQLException expected) { assertEquals( SQLExceptionCode.INSUFFICIENT_MULTI_TENANT_COLUMNS.getErrorCode(), expected.getErrorCode()); } }
@Test public void testBaseTableWrongFormatWithTenantTypeId() throws Exception { // only two PK columns for multi_tenant, multi_type try { createTestTable( getUrl(), "CREATE TABLE BASE_TABLE2 (TENANT_ID VARCHAR NOT NULL PRIMARY KEY, ID VARCHAR NOT NULL, A INTEGER) MULTI_TENANT=true", null, nextTimestamp()); fail(); } catch (SQLException expected) { assertEquals( SQLExceptionCode.INSUFFICIENT_MULTI_TENANT_COLUMNS.getErrorCode(), expected.getErrorCode()); } }