migration.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace Cygnite\Database;
  3. /**
  4. * Cygnite Framework
  5. * Database Migration Configuration Settings
  6. *
  7. * An open source application development framework for PHP 5.3x or newer
  8. *
  9. * License
  10. *
  11. * This source file is subject to the MIT license that is bundled
  12. * with this package in the file LICENSE.txt.
  13. * http://www.cygniteframework.com/license.txt
  14. * If you did not receive a copy of the license and are unable to
  15. * obtain it through the world-wide-web, please send an email
  16. * to [email protected] so I can send you a copy immediately.
  17. *
  18. *@package : Apps
  19. *@subpackages : Database Migration Configurations
  20. *@filename : migration.php
  21. *@description : You can set your session configurations here.
  22. *@author : Sanjoy Dey
  23. *@copyright : Copyright (c) 2013 - 2014,
  24. *@link : http://www.cygniteframework.com
  25. *@since : Version 1.2
  26. *@filesource
  27. *@warning : If you don't protect this directory from direct web access,
  28. * anybody will be able to see your database configuration and settings.
  29. *
  30. *
  31. */
  32. if (!defined('CF_SYSTEM')) {
  33. exit('External script access not allowed');
  34. }
  35. /**
  36. * Initialize your database configurations settings here.
  37. * You can connect with multiple database on the fly.
  38. * Don't worry about performance Cygnite will not
  39. * connect with database until first time you need your
  40. * connection to interact with database.
  41. * Specify your database name and table name in model to
  42. * do crude operations.
  43. *
  44. * <code>
  45. * 'connection' => 'your-database',
  46. * 'migration_path' => 'migration-directory',
  47. * 'migration_table' => 'migration-table-name',
  48. *
  49. * </code>
  50. *
  51. * Example :
  52. * cd console/bin
  53. * php cygnite migrate:init create_products_table
  54. * php cygnite migrate
  55. */
  56. return array(
  57. 'connection' => 'cygnite', //If you don't specify your connection name Cygnite will take default database
  58. //connection to generate your migrations
  59. 'migration_path' => 'apps.migrations',
  60. 'migration_table' => 'migrations',
  61. );