fix
This commit is contained in:
parent
777cb0941a
commit
222a905c3a
@ -600,9 +600,9 @@ func (self *PostgresDatabase) upgrade6to7() {
|
|||||||
func (self *PostgresDatabase) upgrade7to8() {
|
func (self *PostgresDatabase) upgrade7to8() {
|
||||||
log.Println("migrating 7 -> 8")
|
log.Println("migrating 7 -> 8")
|
||||||
cmds := []string{
|
cmds := []string{
|
||||||
"ALTER TABLE ArticleNumbers DROP CONSTRAINT FOREIGN KEY (message_id) REFERENCES ArticlePosts(message_id)",
|
"ALTER TABLE ArticleNumbers DROP CONSTRAINT articlenumbers_message_id_fkey",
|
||||||
"ALTER TABLE ArticleNumbers ADD CONSTRAINT FOREIGN KEY (message_id) REFERENCES ArticlePosts(message_id) ON DELETE CASCADE",
|
"ALTER TABLE ArticleNumbers ADD CONSTRAINT FOREIGN KEY (message_id) REFERENCES ArticlePosts(message_id) ON DELETE CASCADE",
|
||||||
"ALTER TABLE NNTPHeaders DROP CONSTRAINT FOREIGN KEY (header_article_message_id) REFERENCES ArticlePosts(message_id)",
|
"ALTER TABLE NNTPHeaders DROP CONSTRAINT nntpheaders_header_article_message_id_fkey",
|
||||||
"ALTER TABLE NNTPHeaders ADD CONSTRAINT FOREIGN KEY (header_article_message_id) REFERENCES ArticlePosts(message_id) ON DELETE CASCADE",
|
"ALTER TABLE NNTPHeaders ADD CONSTRAINT FOREIGN KEY (header_article_message_id) REFERENCES ArticlePosts(message_id) ON DELETE CASCADE",
|
||||||
}
|
}
|
||||||
for _, cmd := range cmds {
|
for _, cmd := range cmds {
|
||||||
|
Reference in New Issue
Block a user