database.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. return
  3. [
  4. /**
  5. * ---------------------------------------------------------
  6. * Default
  7. * ---------------------------------------------------------
  8. *
  9. * Default configuration to use.
  10. */
  11. 'default' => 'sqlite',
  12. /**
  13. * ---------------------------------------------------------
  14. * Configurations
  15. * ---------------------------------------------------------
  16. *
  17. * You can define as many database configurations as you want.
  18. *
  19. * dsn : PDO data source name
  20. * username : (optional) Username of the database server
  21. * password : (optional) Password of the database server
  22. * persistent : (optional) Set to true to make the connection persistent
  23. * log_queries: (optional) Enable query logging?
  24. * reconnect : (optional) Should the connection automatically be reestablished?
  25. * options : (optional) An array of PDO options
  26. * queries : (optional) Queries that will be executed right after a connection has been made
  27. */
  28. 'configurations' =>
  29. [
  30. 'sqlite' =>
  31. [
  32. 'dsn' => 'sqlite:' . MAKO_APPLICATION_PATH . '/storage/database/test.sqlite',
  33. 'log_queries' => false,
  34. 'reconnect' => false,
  35. 'queries' =>
  36. [
  37. "PRAGMA encoding = 'UTF-8'",
  38. ],
  39. ],
  40. ],
  41. ];