相关疑难解决方法(0)

在postgresql应用程序的rails中运行迁移后的序列注释

当我在postgresql上的Rails应用程序中运行我的迁移时,我得到了以下通知

NOTICE:  CREATE TABLE will create implicit sequence "notification_settings_id_seq" for serial column "notification_settings.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "notification_settings_pkey" for table "notification_settings"
Run Code Online (Sandbox Code Playgroud)

我的迁移文件包含088_create_notification_settings.rb

class CreateNotificationSettings < ActiveRecord::Migration
  def self.up
    create_table :notification_settings do |t|
      t.integer :user_id
      t.integer :notification_id
      t.boolean :notification_on
      t.boolean :outbound
    end
  end

  def self.down
    drop_table :notification_settings
  end
end
Run Code Online (Sandbox Code Playgroud)

我想知道

这个通知意味着什么?

如何避免这种通知?

如果不避免,此类通知对应用程序的影响是什么?

问候,

萨里尔

ruby postgresql ruby-on-rails database-migration

34
推荐指数
2
解决办法
5320
查看次数

rake db:设置结果为fe_sendauth没有提供密码

当我运行:rake db:setup

我得到:

fe_sendauth: no password supplied

Couldn't create database for {"adapter"=>"postfresql", "encoding"=>"unicode",
"host"=>"localhost", "pool"=>5, "username"=>"my_user", "password"=>nil,  
"database"=>"my_db_test"}

-- enable_extension("plpgqsl")
rake aborted


Tasks: TOP => db:schema:load
Run Code Online (Sandbox Code Playgroud)

我的database.yml:

connection: &connection
adapter: postgresql
encoding: unicode
host:     localhost
pool: 5
username: my_user
password:

development:
  <<: *connection
  database: my_db_development

test: &test
  <<: *connection
  database: my_db_test
Run Code Online (Sandbox Code Playgroud)

已经在这个问题中更改了我的pg_hba.conf:尝试为ror应用程序设置postgres,收到错误 - fe_sendauth:没有提供密码 但它根本没有帮助.

ruby postgresql ubuntu ruby-on-rails pg

12
推荐指数
1
解决办法
2万
查看次数