Skip to content

Commit

Permalink
コミット忘れ
Browse files Browse the repository at this point in the history
  • Loading branch information
koda-masaru committed Jan 6, 2015
1 parent 1051f20 commit 927ec17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 58 deletions.
5 changes: 2 additions & 3 deletions document/database/knowledge.a5er
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -87,7 +86,7 @@ EffectMode=None
Color=$000000
BkColor=$FFFFFF
ModifiedDateTime=20150102014151
Position="Main",550,850
Position="MAIN",550,850

[Relation]
Entity1=KNOWLEDGES
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/redcomet/knowledge/deploy/InitDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 {
Expand Down
50 changes: 0 additions & 50 deletions src/main/resources/redcomet/knowledge/database/ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 927ec17

Please sign in to comment.