正常に実行できますcap deploy
が、実行しようとするとcap deploy:migrate
、次のエラーが発生します。
*** [err :: domain.com.br] rake aborted!
*** [err :: domain.com.br] PG::Error: ERROR: Relation"posts"does not exist
*** [err :: domain.com.br] LINE 4: WHERE a.attrelid = '"posts"'::regclass
*** [err :: domain.com.br] ^
*** [err :: domain.com.br] : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
*** [err :: domain.com.br] FROM pg_attribute a LEFT JOIN pg_attrdef d
*** [err :: domain.com.br] ON a.attrelid = d.adrelid AND a.attnum = d.adnum
*** [err :: domain.com.br] WHERE a.attrelid = '"posts"'::regclass
*** [err :: domain.com.br] AND a.attnum > 0 AND NOT a.attisdropped
*** [err :: domain.com.br] ORDER BY a.attnum
*** [err :: domain.com.br]
*** [err :: domain.com.br] Tasks: TOP => db:migrate => environment
*** [err :: domain.com.br] (See full trace by running task with --trace)
command finished in 8091ms
実行中のサーバー上に既にデータベースを作成しました:
create database <databasename>;
編集 移行サンプルの追加:
class AddStatusTagsViewsToPosts < ActiveRecord::Migration
def change
change_table :posts do |p|
p.string :status, default: 'pending'
p.string :tags
p.integer :views
end
end
end
何か助けはありますか?