[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/db/migration/ -> migration_interface.php (source)

   1  <?php
   2  /**
   3   *
   4   * This file is part of the phpBB Forum Software package.
   5   *
   6   * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7   * @license GNU General Public License, version 2 (GPL-2.0)
   8   *
   9   * For full copyright and license information, please see
  10   * the docs/CREDITS.txt file.
  11   *
  12   */
  13  
  14  namespace phpbb\db\migration;
  15  
  16  /**
  17   * Base class interface for database migrations
  18   */
  19  interface migration_interface
  20  {
  21      /**
  22       * Defines other migrations to be applied first
  23       *
  24       * @return array An array of migration class names
  25       */
  26  	static public function depends_on();
  27  
  28      /**
  29       * Allows you to check if the migration is effectively installed (entirely optional)
  30       *
  31       * This is checked when a migration is installed. If true is returned, the migration will be set as
  32       * installed without performing the database changes.
  33       * This function is intended to help moving to migrations from a previous database updater, where some
  34       * migrations may have been installed already even though they are not yet listed in the migrations table.
  35       *
  36       * @return bool True if this migration is installed, False if this migration is not installed (checked on install)
  37       */
  38  	public function effectively_installed();
  39  
  40      /**
  41       * Updates the database schema by providing a set of change instructions
  42       *
  43       * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
  44       */
  45  	public function update_schema();
  46  
  47      /**
  48       * Reverts the database schema by providing a set of change instructions
  49       *
  50       * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
  51       */
  52  	public function revert_schema();
  53  
  54      /**
  55       * Updates data by returning a list of instructions to be executed
  56       *
  57       * @return array Array of data update instructions
  58       */
  59  	public function update_data();
  60  
  61      /**
  62       * Reverts data by returning a list of instructions to be executed
  63       *
  64       * @return array Array of data instructions that will be performed on revert
  65       *     NOTE: calls to tools (such as config.add) are automatically reverted when
  66       *         possible, so you should not attempt to revert those, this is mostly for
  67       *         otherwise unrevertable calls (custom functions for example)
  68       */
  69  	public function revert_data();
  70  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1