MYSQL 1215无法添加外键约束

时间:2018-11-28 12:14:51

标签: mysql

问题在边界表列Vue.component('dashboard-hero-preferences-email-preferences', { props: ['user','preferences','currentPreferences'], data() { return { updated: null, selected: [], updatePreference: null }; }, methods: { updatePreferences(preference) { this.updatePreference = preference; axios.post('/dashboard/preferences/update', { preference: preference.id, value: this.selected[preference.id] }) .then(() => { this.$emit('update'); this.updated = 'yes'; }); } } }); GroupDim.FacultyID上,数据类型为标识FacultyDim.FacultyID OLAP多维数据集的此数据存储,其中Rating_facts存储我正在研究的问题结果。没有签名BIGINT的表格是过渡性表格,可用于其他数据分析。也许需要分割这张表格?

Dim

1 个答案:

答案 0 :(得分:1)

首先,您要检查表的体系结构,然后尝试以下两种解决方案

解决方案1:-

DROP TABLE IF EXISTS FacultyDim;
CREATE TABLE FacultyDim (
    FacultyKey bigint NOT NULL AUTO_INCREMENT,
    FacultyID bigint NOT NULL,
    FacultyName varchar(32) NOT NULL,
    PRIMARY KEY (FacultyID)
)ENGINE=InnoDB;

DROP TABLE IF EXISTS `Group`; 
CREATE TABLE `Group` (
    GroupID bigint NOT NULL,
    FacultyID bigint NOT NULL,
    GroupName varchar(32) NOT NULL,
    PRIMARY KEY (GroupID),
    FOREIGN KEY (FacultyID) REFERENCES FacultyDim(FacultyID) 
)ENGINE=InnoDB;

解决方案2:-

microsoft.systemforcrossdomainidentitymanagement