Schema_version.php 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Table Definition for schema_version
  4. */
  5. class Schema_version extends Managed_DataObject
  6. {
  7. ###START_AUTOCODE
  8. /* the code below is auto generated do not remove the above tag */
  9. public $__table = 'schema_version'; // table name
  10. public $table_name; // varchar(64) primary_key not_null
  11. public $checksum; // varchar(64) not_null
  12. public $modified; // datetime() not_null default_CURRENT_TIMESTAMP
  13. /* the code above is auto generated do not remove the tag below */
  14. ###END_AUTOCODE
  15. public static function schemaDef()
  16. {
  17. return array(
  18. 'description' => 'To avoid checking database structure all the time, we store a checksum of the expected schema info for each table here. If it has not changed since the last time we checked the table, we can leave it as is.',
  19. 'fields' => array(
  20. 'table_name' => array('type' => 'varchar', 'length' => '64', 'not null' => true, 'description' => 'Table name'),
  21. 'checksum' => array('type' => 'varchar', 'length' => '64', 'not null' => true, 'description' => 'Checksum of schema array; a mismatch indicates we should check the table more thoroughly.'),
  22. 'modified' => array('type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'),
  23. ),
  24. 'primary key' => array('table_name'),
  25. );
  26. }
  27. }