未验证 提交 22877a9d 编写于 作者: B bogdanvlviv

Add activerecord/db/ to gitignore

After running `bundle exec rake test:sqlite3` and `bundle exec rake test:sqlite3_mem`
on my VM I noticed that it had created untracked files:

```bash
vagrant@ubuntu-bionic:/rails/activerecord$ git status
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        db/
        file::memory:
```

To prevent them from being accidentally committed I put 'file::memory:' to
`activerecord/db/` folder and added the folder to .gitignore
Also, we could consider fixing this by removing `db/` folder in each test that
creates the folder.

It would be great if someone confirms that it happens not only on my VM.
上级 6d0895a4
/db/
/sqlnet.log
/test/config.yml
/test/fixtures/*.sqlite*
......@@ -108,7 +108,7 @@ def shared_cache_flags
def with_connection(options = {})
db_config = ActiveRecord::Base.configurations.configs_for(env_name: "arunit", name: "primary")
conn_options = options.reverse_merge(
database: in_memory_db? ? "file::memory:" : db_config.database
database: in_memory_db? ? "db/file::memory:" : db_config.database
)
conn = ActiveRecord::Base.sqlite3_connection(conn_options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册