NOT: Rails 3.0.7, Postgresql 8.4.4-1, rake 0.8.7 kullanımı.rake db: sınama: tüm tabloları oluşturmamaya hazır ol
Çalışma testi rayları almaya çalışıyor.
komut tırmık db: Test: iyi çalışır göründüğünden hazırlamak -
$ rake db:test:prepare -t (in /home/beau/looked) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:abort_if_pending_migrations ** Execute db:test:prepare ** Invoke db:test:load (first_time) ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge ** Execute db:test:load ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load NOTICE: CREATE TABLE will create implicit sequence "slugs_id_seq" for serial column "slugs.id" NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index "slugs_pkey" for table "slugs"
ANCAK bazı tabloların yaratılıyor değildir. db: tırmık yarattığı
$ psql -d looked -U admin -c '\d' List of relations Schema | Name | Type | Owner --------+-------------------+----------+------- public | businesses | table | admin public | businesses_id_seq | sequence | admin public | categories | table | admin public | categories_id_seq | sequence | admin public | schema_migrations | table | admin public | slugs | table | admin public | slugs_id_seq | sequence | admin (7 rows)
Tablolar:
Bunlar "gelişme" tabloları test ortamında hazırlanmak -
$ psql -d looked_test -U admin -c '\d' List of relations Schema | Name | Type | Owner --------+-------------------+----------+------- public | categories | table | admin public | schema_migrations | table | admin public | slugs | table | admin public | slugs_id_seq | sequence | admin (4 rows)
Eğer bazı tablolar yarattı görebileceğiniz gibi, ancak işletmeler değil, business_id_seq veya categories_id_seq.
Neden birileri bana zarar verebilir?
Şema dosyanız nasıl görünüyor? 'RAILS_ROOT/db/schema.rb' –
' schema.rb' dosyanız nasıl görünüyor? –
Tamam Sadece kontrol ettim ve tablolar bir şekilde şema dosyasında eksik. –