在 Heroku 上运行 Heroku rake db:migrate 而不迁移数据库

发布于 2024-10-17 22:05:32 字数 9358 浏览 2 评论 0原文

因此,当我运行 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

有什么想法吗?

so when I run heroku rake db:migrate, after pushing my latest code Heroku doesn't alter the tables. However, when I try on my pc(where I also use Postgresql) and run rake db:migrate, it migrates the database and adds the necessary tables and fields to existing tables.

However, from heroku, I don't get any errors, this is the response I get.

 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

Any ideas ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抱着落日 2024-10-24 22:05:32

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

You need to restart the heroku servers using "heroku restart".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文