gorgo13/database-component

v1.1.1 2018-01-18 08:53 UTC

This package is auto-updated.

Last update: 2024-09-06 00:03:13 UTC


README

限制条件

  • 数据库用户应具有DROP和CREATE DATABASE的权限
  • PHP环境应允许使用"putenv"函数

安装

    composer require gorgo13/database-component

已知问题

  • PostgreSQL有时可能会失败,并显示以下消息
  [Symfony\Component\Process\Exception\ProcessFailedException]
  The command "dropdb --if-exists -U postgres -h 127.0.0.1 -p 5432 acme_db" failed.
  Exit Code: 1(General error)
  Working directory: /var/home/sites/acme-site
  Output:
  ================
  Error Output:
  ================
  dropdb: database removal failed: ERROR:  database "acme_db" is being accessed by other users
  DETAIL:  There are 1 other sessions using the database.

或者

  [Symfony\Component\Process\Exception\ProcessFailedException]
  The command "createdb -U postgres -h 127.0.0.1 -p 5432 -O postgres -T acme_db backup_acme_db_8ba0bdc20ffb74f130ec21d2d1d737fe" failed.
  Exit Code: 1(General error)
  Working directory: /var/home/sites/acme-site
  Output:
  ================
  Error Output:
  ================
  createdb: database creation failed: ERROR:  source database "acme_db" is being accessed by other users
  DETAIL:  There is 1 other session using the database.