mocha/sql/mysql/002-tables/004-mocha_tenant_references.sql

16 lines
429 B
SQL

DROP TABLE IF EXISTS mocha_tenant_references;
CREATE TABLE mocha_tenant_references
(
source_tenant_id INT NOT NULL,
target_tenant_id INT NOT NULL,
CONSTRAINT `tenantref_inst_id_FK_tenant_source`
FOREIGN KEY (`source_tenant_id`)
REFERENCES `mocha_tenants` (`id`),
CONSTRAINT `tenantref_inst_id_FK_tenant_target`
FOREIGN KEY (`target_tenant_id`)
REFERENCES `mocha_tenants` (`id`)
);