gpt4 book ai didi

ruby-on-rails - 运行 Heroku rake db :migrate on Heroku not migrating the database

转载 作者:行者123 更新时间:2023-12-01 11:57:56 25 4
gpt4 key购买 nike

所以当我运行 heroku rake db:migrate 时,在推送我的最新代码后,Heroku 不会更改表。但是,当我尝试在我的电脑上(我也使用 Postgresql)并运行 rake db:migrate 时,它​​会迁移数据库并将必要的表和字段添加到现有表中。

但是,从 heroku 中,我没有得到任何错误,这是我得到的响应。

 SQL (2.4ms)   SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'flow_elements'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.2ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"flows"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.7ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"flows"'::regclass

SQL (2.7ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'flows'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.3ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"images"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.3ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"images"'::regclass

SQL (2.3ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'images'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.2ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"login_histories"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.8ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"login_histories"'::regclass

SQL (2.7ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'login_histories'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"projects"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.2ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"projects"'::regclass

SQL (2.6ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'projects'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.3ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"projects_users"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.5ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"projects_users"'::regclass

SQL (2.4ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'projects_users'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (2.2ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"questions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.2ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"questions"'::regclass

SQL (2.4ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'questions'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

Columns for index questions_fts_idx on questions (1.8ms) SELECT a.attnum, a.
attname
FROM pg_attribute a
WHERE a.attrelid = 48972
AND a.attnum IN (0)

SQL (2.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"screens"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (4.3ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"screens"'::regclass

SQL (2.4ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'screens'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

SQL (3.0ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"users"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

PK and serial sequence (3.6ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"users"'::regclass

SQL (2.4ms) SELECT distinct i.relname, d.indisunique, d.indkey, t.oid
FROM pg_class t, pg_class i, pg_index d
WHERE i.relkind = 'i'
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'users'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"'
,'public') )
ORDER BY i.relname

有什么想法吗?

最佳答案

您需要使用“heroku restart”重新启动 heroku 服务器。

关于ruby-on-rails - 运行 Heroku rake db :migrate on Heroku not migrating the database,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5032715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com