diff --git a/document/database/knowledge.a5er b/document/database/knowledge.a5er index 39013df4d..844845d27 100755 --- a/document/database/knowledge.a5er +++ b/document/database/knowledge.a5er @@ -31,7 +31,6 @@ RDBMSType=6 RDBMSTypeName=PostgreSQL GenerateDropTableStatement=1 DropTableIfExists=1 -CreateFk=1 FkOnDeleteOption=on delete cascade FkOnUpdateOption=on update cascade CommonField="登録ユーザ","INSERT_USER","@INT",,,"","",$FFFFFFFF @@ -72,7 +71,7 @@ PName=ACCOUNT_IMAGES LName=アカウントの画像 Comment= TableOption= -Page=Main +Page=MAIN Left=550 Top=850 Field="IMAGE_ID","IMAGE_ID","bigint","NOT NULL",0,"","",$FFFFFFFF,"AUTO_INCREMENT" @@ -87,7 +86,7 @@ EffectMode=None Color=$000000 BkColor=$FFFFFF ModifiedDateTime=20150102014151 -Position="Main",550,850 +Position="MAIN",550,850 [Relation] Entity1=KNOWLEDGES diff --git a/src/main/java/redcomet/knowledge/deploy/InitDB.java b/src/main/java/redcomet/knowledge/deploy/InitDB.java index c6f920181..cdf029be0 100644 --- a/src/main/java/redcomet/knowledge/deploy/InitDB.java +++ b/src/main/java/redcomet/knowledge/deploy/InitDB.java @@ -7,8 +7,6 @@ import redcomet.common.log.Log; import redcomet.common.log.LogFactory; import redcomet.knowledge.deploy.v0_0_1.InitializeSystem; -import redcomet.knowledge.deploy.v0_3_0.Migrate_0_3_0; -import redcomet.knowledge.deploy.v0_3_1.Migrate_0_3_1; import redcomet.web.dao.SystemsDao; import redcomet.web.entity.SystemsEntity; @@ -27,9 +25,10 @@ public InitDB() { super(); // MAP.put("0.0.1", InitializeSystem.get()); // MAP.put("0.1.0", Migrate_0_1_0.get()); - MAP.put("0.2.0", INIT); // 初期公開バージョン - MAP.put("0.3.0", Migrate_0_3_0.get()); - MAP.put(CURRENT, Migrate_0_3_1.get()); + // MAP.put("0.2.0", INIT); // 初期公開バージョン + // MAP.put("0.3.0", Migrate_0_3_0.get()); + // MAP.put("0.3.1", Migrate_0_3_1.get()); + MAP.put(CURRENT, INIT); // マイグレートできなかった } public static void main(String[] args) throws Exception { diff --git a/src/main/resources/redcomet/knowledge/database/ddl.sql b/src/main/resources/redcomet/knowledge/database/ddl.sql index f5274e77f..774eec645 100644 --- a/src/main/resources/redcomet/knowledge/database/ddl.sql +++ b/src/main/resources/redcomet/knowledge/database/ddl.sql @@ -199,56 +199,6 @@ create table KNOWLEDGES ( , constraint KNOWLEDGES_PKC primary key (KNOWLEDGE_ID) ) ; -alter table LIKES - add constraint LIKES_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table COMMENTS - add constraint COMMENTS_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table VOTES - add constraint VOTES_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table VIEW_HISTORIES - add constraint VIEW_HISTORIES_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table STOCKS - add constraint STOCKS_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table KNOWLEDGE_GROUPS - add constraint KNOWLEDGE_GROUPS_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table KNOWLEDGE_USERS - add constraint KNOWLEDGE_USERS_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table KNOWLEDGE_TAGS - add constraint KNOWLEDGE_TAGS_FK1 foreign key (TAG_ID) references TAGS(TAG_ID) - on delete cascade - on update cascade; - -alter table KNOWLEDGE_TAGS - add constraint KNOWLEDGE_TAGS_FK2 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - -alter table KNOWLEDGE_FILES - add constraint KNOWLEDGE_FILES_FK1 foreign key (KNOWLEDGE_ID) references KNOWLEDGES(KNOWLEDGE_ID) - on delete cascade - on update cascade; - comment on table ACCOUNT_IMAGES is 'アカウントの画像'; comment on column ACCOUNT_IMAGES.IMAGE_ID is 'IMAGE_ID'; comment on column ACCOUNT_IMAGES.USER_ID is 'ユーザID';