drupal-7.contact.database.php 765 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Database additions for Drupal\contact\Tests\ContactUpgradePathTest.
  5. *
  6. * This dump only contains data for the contact module. The
  7. * drupal-7.filled.bare.php file is imported before this dump, so the two form
  8. * the database structure expected in tests altogether.
  9. */
  10. // Update the default category to that it is not selected.
  11. db_update('contact')
  12. ->fields(['selected' => '0'])
  13. ->condition('cid', '1')
  14. ->execute();
  15. // Add a custom contact category.
  16. db_insert('contact')->fields([
  17. 'category',
  18. 'recipients',
  19. 'reply',
  20. 'weight',
  21. 'selected'
  22. ])
  23. ->values([
  24. 'category' => 'Upgrade test',
  25. 'recipients' => 'test1@example.com,test2@example.com',
  26. 'reply' => 'Test reply',
  27. 'weight' => 1,
  28. 'selected' => 1,
  29. ])
  30. ->execute();