This is coming in light of #691932: No hook_field_schema_alter() having no future (should have been filed sooner so we could not have it in D8 but anyways). There is a clear inconsistency in how we allow contributed modules to treat field table schemas vs. table schemas from other modules. There are a number of reasons mentioned in https://drupal.org/node/691932#comment-2537356 which, really speaking, would also apply to non-field tables. So the easier solution is to just remove the table altering capabilities.

Files: 
CommentFileSizeAuthor
#10 2060629.d8.patch4.64 KBBTMash
PASSED: [[SimpleTest]]: [MySQL] 64,399 pass(es).
[ View ]
#9 2060629.d8.patch2.77 KBBTMash
PASSED: [[SimpleTest]]: [MySQL] 64,415 pass(es).
[ View ]
#1 2060629.d8.patch2.78 KBBTMash
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2060629.d8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

BTMash’s picture

Status:Active» Needs review
StatusFileSize
new2.78 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2060629.d8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

And I've attached the patch (surprise surprise there were no tests for hook_schema_alter in the first place so there was very little to remove).

Dave Reid’s picture

Just pointing out we need an alterative to this, since this would screw modules like File entity which *must* alter the entity base table since we're adding a bundle column.

BTMash’s picture

I'm not exactly sure what the alternative would be, seeing as we are dealing with having alterable schemas or not having alterable schemas (ie. the rules should be across the board). Regardless, wouldn't this be a case for the files table in core to have a bundle column in the first place?

BTMash’s picture

Version:9.x-dev» 8.x-dev

For now, marking this as 8.x atleast to make sure the tests don't fail.

BTMash’s picture

Version:8.x-dev» 9.x-dev

Now that it shows the patch passes, back to 9.x

BTMash’s picture

1: 2060629.d8.patch queued for re-testing.

BTMash’s picture

Version:9.x-dev» 8.x-dev
Issue summary:View changes

Suddenly dawned on me that this really shouldn't be in 8.x. There are no tests in core for this.

Status:Needs review» Needs work

The last submitted patch, 1: 2060629.d8.patch, failed testing.

BTMash’s picture

Status:Needs work» Needs review
StatusFileSize
new2.77 KB
PASSED: [[SimpleTest]]: [MySQL] 64,415 pass(es).
[ View ]

Rerolling

BTMash’s picture

StatusFileSize
new4.64 KB
PASSED: [[SimpleTest]]: [MySQL] 64,399 pass(es).
[ View ]

Realized there is a schema.api.php that needs to be adjusted as well.

sun’s picture

Crell’s picture

Status:Needs review» Reviewed & tested by the community

I've never liked this hook. :-) Bye bye, hook.

Dave Reid’s picture

I still have yet to have a good answer about how modules like File entity in D8 will be able to provide bundles for file entities without altering a core table's schema. I don't agree with RTBC at all.

sun’s picture

To address that concern, I think we need to get back to #1295148: Maintain common properties/statistics about entities and consider to bump it to critical. I just outlined some thoughts over there.

Crell’s picture

IMO, the answer is "make Files bundleable in core because needing a separate module to make them useful is stupid." It's a bug, let's fix it.

Dave Reid’s picture

Then don't forget users aren't bundleable too! Because they're in the same situation as files. Oh wait, we want to actually get Drupal 8 out before 2015?

sun’s picture

Title:Remove hook_schema_alter() from core.» Remove hook_schema_alter() from core
Category:Feature request» Task
Issue tags:+API clean-up

Fixing some slightly weird issue properties here.

webchick’s picture

Status:Reviewed & tested by the community» Needs review

I don't quite understand how #1295148: Maintain common properties/statistics about entities addresses Dave Reid's concern, but it seems to me that this issue should be postponed on either that or a different issue to resolve #15/#16.

webchick’s picture

Status:Needs review» Postponed

Here's a list of "all" (as of a couple of months ago) modules that implement hook_schema_alter(), btw:

$ cd gotta_download_them_all/allmodules
$ grep -r '_schema_alter(' .
./adbc/adbc.module: * Implements hook_schema_alter().
./adbc/adbc.module:function adbc_schema_alter(&$schema) {
./agrovoc/agrovoc_taxonomy.install: * Implements hook_schema_alter().
./agrovoc/agrovoc_taxonomy.install:function agrovoc_taxonomy_schema_alter(&$schema) {
./apachesolr_confgen/apachesolr_confgen.api.php:function hook_apachesolr_confgen_schema_alter($qp, $solr_version) {
./apachesolr_multilingual/apachesolr_multilingual_confgen/apachesolr_multilingual_confgen.module: * Implements hook_apachesolr_confgen_schema_alter().
./apachesolr_multilingual/apachesolr_multilingual_confgen/apachesolr_multilingual_confgen.module:function apachesolr_multilingual_confgen_apachesolr_confgen_schema_alter($qp, $solr_version) {
./autonodequeue/autonodequeue.module: * Implements hook_schema_alter().
./autonodequeue/autonodequeue.module:function autonodequeue_schema_alter(&$schema) {
./bean/bean_uuid/bean_uuid.install: * Implements hook_schema_alter().
./bean/bean_uuid/bean_uuid.install:function bean_uuid_schema_alter(&$schema = array()) {
./better_countries/better_countries.install: * Implements hook_schema_alter().
./better_countries/better_countries.install:function better_countries_schema_alter(&$schema) {
./better_statistics/better_statistics.module: * Implements hook_schema_alter().
./better_statistics/better_statistics.module:function better_statistics_schema_alter(&$schema) {
./bitcache/bitcache.install: * Implementation of hook_schema_alter().
./bitcache/bitcache.install:function bitcache_schema_alter($schema) {
./block_class/block_class.install:  block_class_schema_alter($schema);
./block_class/block_class.install:  block_class_schema_alter($schema);
./block_class/block_class.install: * Implements hook_schema_alter().
./block_class/block_class.install:function block_class_schema_alter(&$schema) {
./block_class/block_class.install:    block_class_schema_alter($schema);
./block_revisions/block_revisions.install: * Implements hook_schema_alter().
./block_revisions/block_revisions.install:function block_revisions_schema_alter(&$schema) {
./booking_timeslots/booking_timeslots.install:  booking_timeslots_schema_alter($schema);
./booking_timeslots/booking_timeslots.install:  booking_timeslots_schema_alter($schema);
./booking_timeslots/booking_timeslots.install:  * Implementation of hook_schema_alter().
./booking_timeslots/booking_timeslots.install:function booking_timeslots_schema_alter(&$schema) {
./bookingsapi/bookingsapi_participated/bookingsapi_participated.install:function bookingsapi_participated_schema_alter(&$schema) {
./boxes/boxes_uuid/boxes_uuid.install: * Implements hook_schema_alter().
./boxes/boxes_uuid/boxes_uuid.install:function bean_uuid_schema_alter(&$schema = array()) {
./cachetags/cachetags_sql/cachetags_sql.install: * Implements hook_schema_alter().
./cachetags/cachetags_sql/cachetags_sql.install:function cachetags_sql_schema_alter(&$schema) {
./cheatsheet/xml/drupal7.hooks.xml:<para>Perform alterations to existing database schemas.</para><para>When a module modifies the database structure of another module (by changing, adding or removing fields, keys or indexes), it should implement <ref refid="group__hooks_1ga4a00aaeabd6903f707d8385476b9ae2a" kindref="member">hook_schema_alter()</ref> to update the default $schema to take its changes into account.</para><para>See <ref refid="group__schemaapi_1ga9abd926ddaf68a22e6dca28a25d0c6f5" kindref="member">hook_schema()</ref> for details on the schema definition structure.</para><para><parameterlist kind="param"><parameteritem>
./civicrm_entity/civicrm_entity.module: * Implements hook_schema_alter().
./civicrm_entity/civicrm_entity.module:function civicrm_entity_schema_alter(&$schema) {
./coder/coder_upgrade/conversions/function.inc: * Implements hook_upgrade_hook_schema_alter().
./coder/coder_upgrade/conversions/function.inc:function coder_upgrade_upgrade_hook_schema_alter(&$node, &$reader) {
./comment_first/comment_first.install: * Implements hook_schema_alter().
./comment_first/comment_first.install:function comment_first_schema_alter(&$schema) {
./comment_revisions/comment_revisions.module: * Implements hook_schema_alter().
./comment_revisions/comment_revisions.module:function comment_revisions_schema_alter(&$schema) {
./comment_trust/comment_trust.install: * Implements hook_schema_alter().
./comment_trust/comment_trust.install:function comment_trust_schema_alter(&$schema) {
./commerce_exactor/modules/commerce_exactor_euc/commerce_exactor_euc.install: * Implements hook_schema_alter().
./commerce_exactor/modules/commerce_exactor_euc/commerce_exactor_euc.install:function commerce_exactor_euc_schema_alter(&$schema = array()) {
./commerce_order_invoice/commerce_order_invoice.install: * Implements hook_schema_alter().
./commerce_order_invoice/commerce_order_invoice.install:function commerce_order_invoice_schema_alter(&$schema) {
./commerce_order_invoice/commerce_order_invoice.install:  commerce_order_invoice_schema_alter($schema);
./commerce_order_invoice/commerce_order_invoice.install:  commerce_order_invoice_schema_alter($schema);
./commerce_registration/commerce_registration.install: * Implements hook_schema_alter().
./commerce_registration/commerce_registration.install:function commerce_registration_schema_alter(&$schema) {
./commerce_uuid/customer/commerce_uuid_customer.install: * Implements of hook_schema_alter().
./commerce_uuid/customer/commerce_uuid_customer.install:function commerce_uuid_customer_schema_alter(&$schema = array()) {
./commerce_uuid/line_item/commerce_uuid_line_item.install: * Implements of hook_schema_alter().
./commerce_uuid/line_item/commerce_uuid_line_item.install:function commerce_uuid_line_item_schema_alter(&$schema = array()) {
./commerce_uuid/order/commerce_uuid_order.install: * Implements of hook_schema_alter().
./commerce_uuid/order/commerce_uuid_order.install:function commerce_uuid_order_schema_alter(&$schema = array()) {
./commerce_uuid/payment/commerce_uuid_payment.install: * Implements of hook_schema_alter().
./commerce_uuid/payment/commerce_uuid_payment.install:function commerce_uuid_payment_schema_alter(&$schema = array()) {
./commerce_uuid/product/commerce_uuid_product.install: * Implements of hook_schema_alter().
./commerce_uuid/product/commerce_uuid_product.install:function commerce_uuid_product_schema_alter(&$schema = array()) {
./commerce_webform/commerce_webform.install:  commerce_webform_schema_alter($schema);
./commerce_webform/commerce_webform.install:  commerce_webform_schema_alter($schema);
./commerce_webform/commerce_webform.install:  commerce_webform_schema_alter($schema);
./commerce_webform/commerce_webform.install: * Implements hook_schema_alter().
./commerce_webform/commerce_webform.install:function commerce_webform_schema_alter(&$schema) {
./contact_forms/contact_forms.module:function contact_forms_schema_alter(&$schema) {
./context_by_node/context_by_node.install: * Implements hook_schema_alter().
./context_by_node/context_by_node.install:function context_by_node_schema_alter(&$schema) {
./context_by_node/context_by_node.install:  context_by_node_schema_alter($schema);
./course_relationships/course_relationships.install: * Implements hook_schema_alter().
./course_relationships/course_relationships.install:function course_relationships_schema_alter(&$schema) {
./cpn/cpn.install: * Implements hook_schema_alter().
./cpn/cpn.install:function cpn_schema_alter(&$schema) {
./cpn/cpn.install: * Adds CPN fields to block table, as defined in cpn_schema_alter().
./cpn/cpn.install:  cpn_schema_alter($schema);
./cpn/cpn.install: * Drops CPN fields from block table, as defined in cpn_schema_alter().
./cpn/cpn.install:  cpn_schema_alter($schema);
./custom_pub/custom_pub.module: * Implements hook_schema_alter().
./custom_pub/custom_pub.module:function custom_pub_schema_alter(&$schema) {
./data/data.install: * Implements hook_schema_alter().
./data/data.install:function data_schema_alter(&$schema) {
./data/data.install:  // installation is done, as data_schema_alter() sidesteps our schema tables
./data/includes/DataTable.inc:      // to Drupal by data_schema_alter().
./datasources/contrib/datasources_aggregator/datasources_aggregator.install: * Implements hook_schema_alter().
./datasources/contrib/datasources_aggregator/datasources_aggregator.install:function datasources_aggregator_schema_alter(&$schema) {
./datasources/contrib/datasources_aggregator/datasources_aggregator.install:  datasources_aggregator_schema_alter($schema);
./datasources/contrib/datasources_aggregator/datasources_aggregator.install:  datasources_aggregator_schema_alter($schema);
./datasources/contrib/datasources_aggregator/datasources_aggregator.install:  datasources_aggregator_schema_alter($schema);
./dbee/dbee.install:  dbee_schema_alter($schema);
./dbee/dbee.install:  dbee_schema_alter($schema);
./dbee/dbee.install: * Implements hook_schema_alter().
./dbee/dbee.install:function dbee_schema_alter(&$schema) {
./dbee/dbee.install:  dbee_schema_alter($schema);
./dcco/includes/bootstrap.inc: * module that implements hook_schema_alter().
./dcco/includes/bootstrap.inc: * module that implements hook_schema_alter().
./dcco/includes/common.inc: * hook_schema_alter(). The module's tables will be created exactly as the
./dcco/includes/common.inc: * hook_schema_alter(). The module's tables will be created exactly as the
./dcco/includes/common.inc: * hook_schema_alter() is not invoked and these unprocessed
./dcco/includes/common.inc: * module that implements hook_schema_alter().
./dcco/modules/system/system.api.php: * implement hook_schema_alter() to update the default $schema to take its
./dcco/modules/system/system.api.php:function hook_schema_alter(&$schema) {
./dcco/profiles/cod/modules/contrib/commerce_registration/commerce_registration.install: * Implements hook_schema_alter().
./dcco/profiles/cod/modules/contrib/commerce_registration/commerce_registration.install:function commerce_registration_schema_alter(&$schema) {
./dcco/profiles/cod/modules/contrib/strongarm/strongarm.module: * Implements hook_schema_alter().
./dcco/profiles/cod/modules/contrib/strongarm/strongarm.module:function strongarm_schema_alter(&$schema) {
./dcco/profiles/cod/modules/contrib/uuid/uuid.entity.inc: * @see uuid_schema_alter()
./dcco/profiles/cod/modules/contrib/uuid/uuid.install: * @see uuid_schema_alter()
./dcco/profiles/cod/modules/contrib/uuid/uuid.install: * Implements of hook_schema_alter().
./dcco/profiles/cod/modules/contrib/uuid/uuid.install:function uuid_schema_alter(&$schema = array()) {
./dcco/sites/all/modules/contrib/bean/bean_uuid/bean_uuid.install: * Implements hook_schema_alter().
./dcco/sites/all/modules/contrib/bean/bean_uuid/bean_uuid.install:function bean_uuid_schema_alter(&$schema = array()) {
./devshop_hosting/devshop_live/devshop_live.install: * Implements hook_schema_alter().
./devshop_hosting/devshop_live/devshop_live.install:function devshop_live_schema_alter(&$schema) {
./disemvowel/disemvowel.install: * Implements hook_schema_alter().
./disemvowel/disemvowel.install:function disemvowel_schema_alter(&$schema) {
./doctrine/doctrine.install: * Implements hook_schema_alter().
./doctrine/doctrine.install:function doctrine_schema_alter(&$schema) {
./docusign/docusign.install: * Implements hook_schema_alter().
./docusign/docusign.install:function docusign_schema_alter(&$schema) {
./domain_relationships/domain_relationships.install: * Implementation of hook_schema_alter().
./domain_relationships/domain_relationships.install:function domain_relationships_schema_alter(&$schema) {
./domain_roles/domain_roles.install: * Implements hook_schema_alter().
./domain_roles/domain_roles.install:function domain_roles_schema_alter(&$schema) {
./domain_roles/domain_roles.install:  // Call domain_roles_schema_alter() to get new field description.
./domain_roles/domain_roles.install:  domain_roles_schema_alter($schema);
./domain_roles/domain_roles.install:  // Call domain_roles_schema_alter() to get field description.
./domain_roles/domain_roles.install:  domain_roles_schema_alter($schema);
./domain_types/domain_types.module: * Implements hook_schema_alter().
./domain_types/domain_types.module:function domain_types_schema_alter(&$schema) {
./dominion/dominion.install:  dominion_schema_alter($schema);
./dominion/dominion.install:  dominion_schema_alter($schema);
./dominion/dominion.install: * Implements hook_schema_alter().
./dominion/dominion.install:function dominion_schema_alter(&$schema) {
./dominion/dominion.install:  dominion_schema_alter($schema);
./drupal_ruble/commands/hooks.rb: * Implements hook_schema_alter().
./drupal_ruble/commands/hooks.rb:function #{moduleName}_schema_alter(&\\$schema) {
./drupalforkomodo/Abbreviations/PHP/Drupal 7/hooks/d7_schema_alter.komodotool:    " * Implements hook_schema_alter().",
./drupalforkomodo/Abbreviations/PHP/Drupal 7/hooks/d7_schema_alter.komodotool:    "function [[%b]]_schema_alter($schema) {",
./drupalorg/drupalorg_git_gateway/drupalorg_git_gateway.install:function drupalorg_git_gateway_schema_alter(&$schema) {
./ds/modules/ds_extras/ds_extras.install:  ds_extras_schema_alter($schema);
./ds/modules/ds_extras/ds_extras.install: * Implements hook_schema_alter().
./ds/modules/ds_extras/ds_extras.install:function ds_extras_schema_alter(&$schema) {
./easy_module/data/easy_module_hooks.data.php:implement hook_schema_alter() to update the default $schema to take
./easy_module/data/easy_module_hooks.data.php: * keys or indexes), it should implement hook_schema_alter() to update the
./easy_module/data/easy_module_hooks.data.php: *   None.','signature' => 'hook_schema_alter(&$schema)','sample_code' => '  // Add field to existing schema.
./easy_module/data/easy_module_hooks.data.php:implement hook_schema_alter() to update the default $schema to take its
./easy_module/data/easy_module_hooks.data.php: * keys or indexes), it should implement hook_schema_alter() to update the
./easy_module/data/easy_module_hooks.data.php: *   Nested array describing the schemas for all modules.','signature' => 'hook_schema_alter(&$schema)','sample_code' => '  // Add field to existing schema.
./ec_address_extra/ec_address_extra.install: * Implementation of hook_schema_alter().
./ec_address_extra/ec_address_extra.install:function ec_address_extra_schema_alter(&$schema) {
./ec_authorize_net/ec_authorize_net.install: * Implementation of hook_schema_alter().
./ec_authorize_net/ec_authorize_net.install:function ec_authorize_net_schema_alter(&$schema) {
./ec_domain/ec_domain.install: * Implementation of hook_schema_alter().
./ec_domain/ec_domain.install:function ec_domain_schema_alter(&$schema) {
./ec_donate/ec_donate.install: * Implementation of hook_schema_alter().
./ec_donate/ec_donate.install:function ec_donate_schema_alter(&$schema) {
./ec_eway/ec_eway.install: * Implements hook_schema_alter().
./ec_eway/ec_eway.install:function ec_eway_schema_alter(&$schema) {
./ec_licensing/ec_licensing.install:function ec_licensing_schema_alter(&$schema) {
./ec_moneris/ec_moneris.install: * Implementation of hook_schema_alter().
./ec_moneris/ec_moneris.install:function ec_moneris_schema_alter(&$schema) {
./ec_recurring/ec_recurring.install:function ec_recurring_schema_alter(&$schema) {
./ec_ship/ec_ship.install: * Implementation of hook_schema_alter().
./ec_ship/ec_ship.install:function ec_ship_schema_alter(&$schema) {
./ec_subproducts/ec_subproducts.install: * Implementation of hook_schema_alter().
./ec_subproducts/ec_subproducts.install:function ec_subproducts_schema_alter(&$schema) {
./eck/eck.module:function eck_schema_alter(&$schema){
./eclipse/Drupal.xml: * Implements hook_schema_alter().
./eclipse/Drupal.xml:function ${module_name}_schema_alter($$schema) {
./ecommerce/ec_anon/ec_anon.install: * Implements hook_schema_alter().
./ecommerce/ec_anon/ec_anon.install:function ec_anon_schema_alter(&$schema) {
./ecommerce/ec_buynow/ec_buynow.install: * Implements hook_schema_alter().
./ecommerce/ec_buynow/ec_buynow.install:function ec_buynow_schema_alter(&$schema) {
./ecommerce/ec_cart/ec_cart.install: * Implements hook_schema_alter().
./ecommerce/ec_cart/ec_cart.install:function ec_cart_schema_alter(&$schema) {
./ecommerce/ec_paypal/ec_paypal.install:function ec_paypal_schema_alter(&$schema) {
./ecommerce/ec_store/ec_store.install:  // Note: If this table is being altered by hook_schema_alter() be sure to
./election/election_candidate/election_candidate.install: * Implements hook_schema_alter().
./election/election_candidate/election_candidate.install:function election_candidate_schema_alter(&$schema) {
./election/election_post/election_post.install: * Implements hook_schema_alter().
./election/election_post/election_post.install:function election_post_schema_alter(&$schema) {
./encrypted_files/encrypted_files.install: * Implements hook_schema_alter().
./encrypted_files/encrypted_files.install:function encrypted_files_schema_alter(&$schema) {
./encrypted_files/encrypted_files.install:  encrypted_files_schema_alter($modifications);
./entity_index/entity_index_uri/entity_index_uri.install: * Implements hook_schema_alter().
./entity_index/entity_index_uri/entity_index_uri.install:function entity_index_uri_schema_alter(&$schema) {
./entity_index/entity_index_uri/entity_index_uri.install:  entity_index_uri_schema_alter($schema);
./entity_index/entity_index_uri/entity_index_uri.install:  entity_index_uri_schema_alter($schema);
./entity_menu_links/entity_menu_links.install: * Implements hook_schema_alter().
./entity_menu_links/entity_menu_links.install:function entity_menu_links_schema_alter(&$schema = array()) {
./entity_uuid/entity_uuid.install: * Implements hook_schema_alter().
./entity_uuid/entity_uuid.install:function entity_uuid_schema_alter(&$schema = array()) {
./er/er.module: * Implements hook_schema_alter().
./er/er.module:function er_schema_alter(&$schema) {
^[[B^[[B./esi/modules/esi_block/esi_block.install:function esi_block_schema_alter(&$schema = array()) {
./esi/modules/esi_block/esi_block.install:  $schema = esi_block_schema_alter();
./esi/modules/esi_block/esi_block.install:  $schema = esi_block_schema_alter();
./esi/modules/esi_panels/esi_panels.install: * Implements hook_schema_alter().
./esi/modules/esi_panels/esi_panels.install:function esi_panels_schema_alter(&$schema) {
./eve_api/eve_api.module: * Implements hook_schema_alter().
./eve_api/eve_api.module:function eve_api_schema_alter(&$schema) {
./eve_api/eve_api_teamspeak/eve_api_teamspeak.module: * Implements hook_schema_alter().
./eve_api/eve_api_teamspeak/eve_api_teamspeak.module:function eve_api_teamspeak_schema_alter(&$schema) {
./event/event.module: * Implementation of hook_schema_alter(). We alter $schema by reference.
./event/event.module:function event_schema_alter(&$schema) {
./event_views/event_views.install:function event_views_schema_alter(&$schema)
./event_views/event_views.install:   // Get fields altered fields from hook_schema_alter()
./event_views/event_views.install:   event_views_schema_alter($schema);
./event_views/event_views.install:   event_views_schema_alter($schema);
./ext_search_page/ext_search_page.install: * Implements hook_schema_alter().
./ext_search_page/ext_search_page.install:function ext_search_page_schema_alter(&$schema) {
./ext_search_page/ext_search_page.install:  ext_search_page_schema_alter($new_schema);
./ext_search_page/ext_search_page.install:  ext_search_page_schema_alter($new_schema);
./fbconnect/fbconnect.install: * Implements hook_schema_alter().
./fbconnect/fbconnect.install:function fbconnect_schema_alter(&$schema) {
./fbconnect/fbconnect.install:    fbconnect_schema_alter($schema);
./fboauth/fboauth.install: * Implements hook_schema_alter()
./fboauth/fboauth.install:function fboauth_schema_alter(&$schema) {
./fboauth/fboauth.install:    fboauth_schema_alter($schema);
./fe_paths/fe_paths.install: * Implements hook_schema_alter().
./fe_paths/fe_paths.install:function fe_paths_schema_alter(&$schema) {
./file_admin/file_admin.install:  file_admin_schema_alter($file_admin_schema);
./file_admin/file_admin.install:  file_admin_schema_alter($file_admin_schema);
./file_admin/file_admin.install: * Implements hook_schema_alter().
./file_admin/file_admin.install:function file_admin_schema_alter(&$schema) {
./file_aliases/file_aliases.install: * Implements hook_schema_alter().
./file_aliases/file_aliases.install:function file_aliases_schema_alter(&$schema) {
./file_entity/file_entity.install: * Implements hook_schema_alter().
./file_entity/file_entity.install:function file_entity_schema_alter(&$schema) {
./file_entity/file_entity.install:  file_entity_schema_alter($schema);
./file_entity_revisions/file_entity_revisions.install:  file_entity_schema_alter($temp_schema);
./file_entity_revisions/file_entity_revisions.install:  file_admin_schema_alter($temp_schema);
./file_entity_revisions/file_entity_revisions.install: * Implements hook_schema_alter().
./file_entity_revisions/file_entity_revisions.install:function file_entity_revisions_schema_alter(&$schema) {
./file_entity_revisions/file_entity_revisions.install:  file_entity_revisions_schema_alter($schema);
./filebanlist/fileban.install: * Implements hook_schema_alter().
./filebanlist/fileban.install:function fileban_schema_alter(&$schema) {
./filefield_paths/filefield_paths.install: * Implements hook_schema_alter().
./filefield_paths/filefield_paths.install:function filefield_paths_schema_alter(&$schema) {
./flag_weights/flag_weights.module: * Implements hook_schema_alter(). We alter $schema by reference().
./flag_weights/flag_weights.module:function flag_weights_schema_alter(&$schema) {
./fluxkraft/modules/fluxkraft_rules/fluxkraft_rules.install: * Implementation of hook_schema_alter().
./fluxkraft/modules/fluxkraft_rules/fluxkraft_rules.install:function fluxkraft_rules_schema_alter(&$schema) {
./force_password_change/force_password_change.install: * Implementation of hook_schema_alter()
./force_password_change/force_password_change.install:function force_password_change_schema_alter(&$schema)
./forgotten_login/forgotten_login.install: * Implements hook_schema_alter().
./forgotten_login/forgotten_login.install:function forgotten_login_schema_alter(&$schema) {
./fse/modules/forms_attach_field/forms_attach_field.install:  forms_attach_field_schema_alter($schema);
./fse/modules/forms_attach_field/forms_attach_field.install:  forms_attach_field_schema_alter($schema);
./fse/modules/forms_attach_field/forms_attach_field.module: *  Implementation of hook_schema_alter().
./fse/modules/forms_attach_field/forms_attach_field.module:function forms_attach_field_schema_alter(&$schema) {
./geocluster/geocluster.geohash.inc: * Implements hook_field_schema_alter().
./geocluster/geocluster.geohash.inc:function geocluster_field_schema_alter(&$schema, $field) {
./geocluster/geocluster.install:          geocluster_field_schema_alter($schema, $field);
./geocluster/modules/geocluster_demo/geocluster_demo.make.example:; No hook_field_schema_alter() http://drupal.org/node/691932#comment-6635614
./hosting_civicrm_cron/hosting_civicrm_cron.install: * Implements hook_schema_alter().
./hosting_civicrm_cron/hosting_civicrm_cron.install:function hosting_civicrm_cron_schema_alter(&$schema) {
./i18n/i18n_block/i18n_block.install: * Implements hook_schema_alter().
./i18n/i18n_block/i18n_block.install:function i18n_block_schema_alter(&$schema) {
./i18n/i18n_menu/i18n_menu.install: * Implements hook_schema_alter().
./i18n/i18n_menu/i18n_menu.install:function i18n_menu_schema_alter(&$schema) {
./i18n/i18n_string/i18n_string.install: * Implements hook_schema_alter().
./i18n/i18n_string/i18n_string.install:function i18n_string_schema_alter(&$schema) {
./i18n/i18n_taxonomy/i18n_taxonomy.install: * Implements hook_schema_alter().
./i18n/i18n_taxonomy/i18n_taxonomy.install:function i18n_taxonomy_schema_alter(&$schema) {
./icon/modules/icon_block/icon_block.install: * Implements hook_schema_alter().
./icon/modules/icon_block/icon_block.install:function icon_block_schema_alter(&$schema) {
./idealubercart/idealubercart.install: * Implements hook_schema_alter().
./idealubercart/idealubercart.install:function idealubercart_schema_alter(array &$schema) {
./idealubercart/idealubercart.install:  idealubercart_schema_alter($schema);
./im/includes/common.inc: * module that implements hook_schema_alter().
./im/includes/common.inc: * hook_schema_alter(). The module's tables will be created exactly as the
./im/includes/common.inc: * hook_schema_alter(). The module's tables will be created exactly as the
./im/includes/common.inc: * hook_schema_alter() is not invoked and these unprocessed
./im/includes/common.inc: * module that implements hook_schema_alter().
./image_hide/image_hide.install: * Implements hook_schema_alter().
./image_hide/image_hide.install:function image_hide_schema_alter(&$schema) {
./input_formats/input_formats.module: * Implementation of hook_schema_alter().
./input_formats/input_formats.module:function input_formats_schema_alter(&$schema) {
./jquad/includes/core.inc: * The returned data will include any modifications made by any module that implements hook_schema_alter().
./kproject/kproject.module:function kproject_schema_alter(&$schema) {
./l10n_update/l10n_update.install: * Implements hook_schema_alter().
./l10n_update/l10n_update.install:function l10n_update_schema_alter(&$schema) {
./language_fallback/language_fallback.install: * Implements hook_schema_alter().
./language_fallback/language_fallback.install:function language_fallback_schema_alter(&$schema) {
./language_multidomain/language_multidomain.install: * Implements hook_schema_alter().
./language_multidomain/language_multidomain.install:function language_multidomain_schema_alter(&$schema) {
./ldap_integration/ldapdata.module: * Implementation of hook_schema_alter().
./ldap_integration/ldapdata.module:function ldapdata_schema_alter($schema) {
./ldap_integration/ldapgroups.module: * Implementation of hook_schema_alter().
./ldap_integration/ldapgroups.module:function ldapgroups_schema_alter($schema) {
./lingotek/lingotek.install: * Implements hook_schema_alter().
./lingotek/lingotek.install:function lingotek_schema_alter(&$schema) {
./lm_paypal/lm_paypal_features/lm_paypal_features.module: * Implements hook_schema_alter().
./lm_paypal/lm_paypal_features/lm_paypal_features.module:function lm_paypal_features_schema_alter(&$schema) {
./locale_currency/locale_currency.install: * Implements hook_schema_alter().
./locale_currency/locale_currency.install:function locale_currency_schema_alter(&$schema) {
./lti_tool_provider/lti_tool_provider_outcomes/lti_tool_provider_outcomes.install: * Implements hook_schema_alter().
./lti_tool_provider/lti_tool_provider_outcomes/lti_tool_provider_outcomes.install:function lti_tool_provider_outcomes_schema_alter(&$schema) {
./mailfix/mailfix_compulsory_accounts/mailfix_compulsory_accounts.install: * Implementation of hook_schema_alter(). We alter $schema by reference.
./mailfix/mailfix_compulsory_accounts/mailfix_compulsory_accounts.install:function mailfix_schema_alter(&$schema) {
./media_translation/media_translation.install: * Implements hook_schema_alter().
./media_translation/media_translation.install:function media_translation_schema_alter(&$schema) {
./menu_dummy/menu_dummy.install: * Implementation of hook_schema_alter().
./menu_dummy/menu_dummy.install:function menu_dummy_schema_alter(&$schema) {
./menu_firstchild/menu_firstchild.install: * Implementation of hook_schema_alter().
./menu_firstchild/menu_firstchild.install:function menu_firstchild_schema_alter(&$schema) {
./metaxo/metaxo.install:  metaxo_schema_alter($new_schema);
./metaxo/metaxo.install:  metaxo_schema_alter($new_schema);
./metaxo/metaxo.install:function metaxo_schema_alter(&$schema) {
./migrate/migrate.module:// Continue hook_schema_alter() for map & message tables?
./mixed_session/modules/ms_core.install: * Implements hook_schema_alter().
./mixed_session/modules/ms_core.install:function ms_core_schema_alter(&$schema) {
./mixed_session/modules/ms_core.install:  ms_core_schema_alter($schema);
./modr8/modr8.install: * Implements hook_schema_alter().
./modr8/modr8.install:function modr8_schema_alter(&$schema) {
./nd_contrib/nd_switch_bm/nd_switch_bm.install:  nd_switch_bm_schema_alter($schema);
./nd_contrib/nd_switch_bm/nd_switch_bm.install: * Implementation of hook_schema_alter().
./nd_contrib/nd_switch_bm/nd_switch_bm.install:function nd_switch_bm_schema_alter(&$schema) {
./netforum_authentication/netforum_authentication.install: * Implements hook_schema_alter().
./netforum_authentication/netforum_authentication.install:function netforum_authentication_schema_alter(&$schema) {
./no_term_pages/no_term_pages.install: * Implements hook_schema_alter().
./no_term_pages/no_term_pages.install:function no_term_pages_schema_alter(&$schema) {
./node_gallery_hierarchy/node_gallery_hierarchy.install: * Implements hook_schema_alter()
./node_gallery_hierarchy/node_gallery_hierarchy.install:function node_gallery_hierarchy_schema_alter(&$schema) {
./node_gallery_hierarchy/node_gallery_hierarchy.install:  node_gallery_hierarchy_schema_alter($schema);
./node_publish_dates/node_publish_dates.install:  node_publish_dates_schema_alter($schema);
./node_publish_dates/node_publish_dates.module: * Implements hook_schema_alter().
./node_publish_dates/node_publish_dates.module:function node_publish_dates_schema_alter(&$schema) {
./nodeorder/nodeorder.install: * Implements hook_schema_alter().
./nodeorder/nodeorder.install:function nodeorder_schema_alter(&$schema) {
./nodequeue_annotate/nodequeue_annotate.install:function nodequeue_annotate_schema_alter(&$schema) {
./nodequeue_annotate/nodequeue_annotate.install:  nodequeue_annotate_schema_alter($schema);
./nodequeue_randomizer/nodequeue_randomizer.install: * Implementation of hook_schema_alter().
./nodequeue_randomizer/nodequeue_randomizer.install:function nodequeue_randomizer_schema_alter(&$schema) {
./nopremium/nopremium.install: * Implementation of hook_schema_alter().
./nopremium/nopremium.install:function nopremium_schema_alter(&$schema) {
./og_mailing_list/og_mailing_list.module:function og_mailing_list_schema_alter(&$schema) {
./ooyala/ooyala.install:  // have this additional hook as hook_field_schema_alter() is Drupal 8 only at
./openforis/openforis.module: * Implementation of hook_schema_alter().
./openforis/openforis.module:function openforis_schema_alter(&$schema) {
./payment_uuid/payment_uuid.install: * Implements of hook_schema_alter().
./payment_uuid/payment_uuid.install:function payment_uuid_schema_alter(&$schema = array()) {
./pdo_oci/tests/bootstrap.inc: * module that implements hook_schema_alter().
./pdo_oci/tests/bootstrap.inc: * module that implements hook_schema_alter().
./phpass/phpass.install: * Implements hook_schema_alter().
./phpass/phpass.install:function phpass_schema_alter(&$schema) {
./picture/flexslider_picture/flexslider_picture.install: * Implements hook_schema_alter().
./picture/flexslider_picture/flexslider_picture.install:function flexslider_picture_schema_alter(&$schema) {
./picture/flexslider_picture/flexslider_picture.module: * @see flexslider_picture_schema_alter()
./poll_extras/poll_extras.install: * Implements hook_schema_alter().
./poll_extras/poll_extras.install:function poll_extras_schema_alter(&$schema) {
./rabbit_hole/rabbit_hole.module: * Implements hook_schema_alter().
./rabbit_hole/rabbit_hole.module:function rabbit_hole_schema_alter(&$schema) {
./redhen/modules/redhen_engagement/redhen_engagement.module: * Implements hook_schema_alter().
./redhen/modules/redhen_engagement/redhen_engagement.module:function redhen_engagement_schema_alter(&$schema) {
./registration_commerce/registration_commerce.install: * Implements hook_schema_alter().
./registration_commerce/registration_commerce.install:function registration_commerce_schema_alter(&$schema) {
./registration_commerce/registration_commerce.install:  registration_commerce_schema_alter($new_schema);
./registration_commerce/registration_commerce.install:  registration_commerce_schema_alter($new_schema);
./riddle/riddle.module: * Implements hook_schema_alter(). We alter $schema by reference.
./riddle/riddle.module:function riddle_schema_alter(&$schema) {
./role_export/role_export.install: * Implements hook_schema_alter().
./role_export/role_export.install:function role_export_schema_alter(&$schema) {
./roleweight/roleweight.install: * Implementation of hook_schema_alter().
./roleweight/roleweight.install:function roleweight_schema_alter() {
./sapi/sapi.module: * Implements hook_schema_alter().
./sapi/sapi.module:function sapi_schema_alter(&$schema) {
./seedbox/seedbox.install:function seedbox_schema_alter(&$schema) {
./send/modules/send_track/includes/send_track.track.inc:function _send_track_schema_alter(&$schema) {
./send/modules/send_track/send_track.module: * Implementation of hook_schema_alter().
./send/modules/send_track/send_track.module:function send_track_schema_alter(&$schema) {
./send/modules/send_track/send_track.module:    _send_track_schema_alter($schema);
./send/modules/send_track/send_track.module: * Implementation of hook_schema_alter().
./sequential_nodes/sequential_nodes.install: * Implements hook_schema_alter().
./sequential_nodes/sequential_nodes.install:function sequential_nodes_schema_alter(&$schema) {
./signature_forum/signature_forum.install: * Implementation of hook_schema_alter().
./signature_forum/signature_forum.install:function signature_forum_schema_alter(&$schema) {
./signup_node_spawn/signup_node_spawn.module: * Implementation of hook_schema_alter().
./signup_node_spawn/signup_node_spawn.module:function signup_node_spawn_schema_alter(&$schema) {
./signup_status/CHANGELOG.txt:= #581768 by dww: Added missing hook_schema_alter() implementation to
./signup_status/signup_status.install: * Implementation of hook_schema_alter().
./signup_status/signup_status.install:function signup_status_schema_alter(&$schema) {
./simplenews_threaded_send/simplenews_threaded_send.install: * Implementation of hook_schema_alter().
./simplenews_threaded_send/simplenews_threaded_send.install:function simplenews_threaded_send_schema_alter(&$schema) {
./sso/client/singlesignon_client.install: * Implementation of hook_schema_alter().
./sso/client/singlesignon_client.install:function singlesignon_client_schema_alter(&$schema) {
./sso/client/singlesignon_client.install:  _singlesignon_schema_alter($schema);
./sso/controller/singlesignon_controller.install:  singlesignon_controller_schema_alter($schema);
./sso/controller/singlesignon_controller.install:  singlesignon_controller_schema_alter($schema);
./sso/controller/singlesignon_controller.install: * Implementation of hook_schema_alter().
./sso/controller/singlesignon_controller.install:function singlesignon_controller_schema_alter(&$schema) {
./sso/controller/singlesignon_controller.install:  _singlesignon_schema_alter($schema);
./sso/singlesignon.inc: * Delegate for hook_schema_alter().
./sso/singlesignon.inc:function _singlesignon_schema_alter(&$schema) {
./statistics_granularity/statistics_granularity.install:function statistics_granularity_schema_alter(&$schema) {
./statistics_granularity/statistics_granularity.install:} // end function statistics_granualrity_schema_alter()
./statuses/submodules/fbss_privacy/fbss_privacy.install: * Implements hook_schema_alter().
./statuses/submodules/fbss_privacy/fbss_privacy.install:function fbss_privacy_schema_alter(&$schema) {
./storage_api/audit/storage_audit.install: * Implement hook_schema_alter().
./storage_api/audit/storage_audit.install:function storage_audit_schema_alter(array &$schema) {
./strongarm/strongarm.module: * Implements hook_schema_alter().
./strongarm/strongarm.module:function strongarm_schema_alter(&$schema) {
./subs/contrib/roles/subs_roles.install: * Implements hook_schema_alter().
./subs/contrib/roles/subs_roles.install:function subs_roles_schema_alter(&$schema) {
./subs_payment_payment/subs_payment_payment.install: * Implements hook_schema_alter()
./subs_payment_payment/subs_payment_payment.install:function subs_payment_payment_schema_alter(&$schema) {
./subs_roles/subs_roles.module: * Implements hook_schema_alter()
./subs_roles/subs_roles.module:function subs_roles_schema_alter(&$schema) {
./subscriptions/subscriptions_mail.install:  subscriptions_mail_schema_alter($new_schema);
./subscriptions/subscriptions_mail.install:  subscriptions_mail_schema_alter($new_schema);
./subscriptions/subscriptions_mail.module: * Implements hook_schema_alter().
./subscriptions/subscriptions_mail.module:function subscriptions_mail_schema_alter(array &$schema) {
./tardis/modules/tardisdate/tardisdate.install: * Implements hook_schema_alter().
./tardis/modules/tardisdate/tardisdate.install:function tardisdate_schema_alter(&$schema) {
./tardis/modules/tardisi18n/tardisi18n.install: * Implements hook_schema_alter().
./tardis/modules/tardisi18n/tardisi18n.install:function tardisi18n_schema_alter(&$schema) {
./tardis/modules/tardisrender/tardisrender.install: * Implements hook_schema_alter().
./tardis/modules/tardisrender/tardisrender.install:function tardisrender_schema_alter(&$schema) {
./tardis/modules/tardistoken/tardistoken.install: * Implements hook_schema_alter().
./tardis/modules/tardistoken/tardistoken.install:function tardistoken_schema_alter(&$schema) {
./taxonomy_changed/taxonomy_changed.install:  taxonomy_changed_schema_alter($schema);
./taxonomy_changed/taxonomy_changed.install:  taxonomy_changed_schema_alter($schema);
./taxonomy_changed/taxonomy_changed.install: * Implements hook_schema_alter().
./taxonomy_changed/taxonomy_changed.install:function taxonomy_changed_schema_alter(&$schema) {
./taxonomy_creation_date/taxonomy_creation_date.install: * Implements hook_schema_alter().
./taxonomy_creation_date/taxonomy_creation_date.install:function taxonomy_creation_date_schema_alter(&$schema) {
./taxonomy_creation_date/taxonomy_creation_date.install:  taxonomy_creation_date_schema_alter($schema);
./taxonomy_machine_names/taxonomy_machine_names.module: * Implementation of hook_schema_alter()
./taxonomy_machine_names/taxonomy_machine_names.module:function taxonomy_machine_names_schema_alter(&$schema) {
./taxonomy_revision/taxonomy_revision.install: * Implements hook_schema_alter().
./taxonomy_revision/taxonomy_revision.install:function taxonomy_revision_schema_alter(&$schema) {
./taxonomy_revision/taxonomy_revision.install:  taxonomy_revision_schema_alter($schema);
./taxonomy_subterms/taxonomy_subterms.install:  taxonomy_subterms_schema_alter($new_schema);
./taxonomy_subterms/taxonomy_subterms.install:  taxonomy_subterms_schema_alter($new_schema);
./taxonomy_subterms/taxonomy_subterms.install:function taxonomy_subterms_schema_alter(&$schema) {
./taxonomy_treemenu/taxonomy_treemenu.install:function taxonomy_treemenu_schema_alter(&$schema) {
./tcontact/tcontact.module:function tcontact_schema_alter(&$schema) {
./term_fields/term_fields.module: * Implements hook_schema_alter()
./term_fields/term_fields.module:function term_fields_schema_alter(&$schema) {
./testandtarget/testandtarget.install:function testandtarget_schema_alter(&$schema = array()) {
./testandtarget/testandtarget.install:  $schema = testandtarget_schema_alter();
./testandtarget/testandtarget.install:  $schema = testandtarget_schema_alter();
./textimage/textimage.module: * Implements hook_schema_alter().
./textimage/textimage.module:function textimage_schema_alter(&$schema) {
./textmate/Support/commands/generated/hooks/6/hook_schema_alter.6.php: * Implements hook_schema_alter().
./textmate/Support/commands/generated/hooks/6/hook_schema_alter.6.php:function <?php print $basename; ?>_schema_alter(&\$schema) {
./textmate/Support/commands/generated/hooks/7/hook_schema_alter.7.php: * Implements hook_schema_alter().
./textmate/Support/commands/generated/hooks/7/hook_schema_alter.7.php:function <?php print $basename; ?>_schema_alter(&\$schema) {
./tf_views/tf_views.install: * Implements hook_schema_alter().
./tf_views/tf_views.install:function tf_views_schema_alter() {
./time_tracker/time_sheet/time_sheet.install:function time_sheet_schema_alter(&$schema){
./time_tracker_simple/time_tracker_simple.module: * Implementation of hook_schema_alter().
./time_tracker_simple/time_tracker_simple.module:function time_tracker_simple_schema_alter(&$schema) {
./treeable/treeable.module:  // Unfortunately there is no hook_field_schema_alter() so add the tree columns
./treeable/treeable.module:  // Unfortunately there is no hook_field_schema_alter() so use this superugly
./trustcommerce/trustcommerce.install: * Implementation of hook_schema_alter().
./trustcommerce/trustcommerce.install:function trustcommerce_schema_alter(&$schema) {
./uc_addresses/tests/uc_addresses_test.install: * Implements hook_schema_alter().
./uc_addresses/tests/uc_addresses_test.install:function uc_addresses_test_schema_alter(&$schema) {
./uc_addresses/uc_addresses_example/README.txt:1. Implement hook_schema_alter() to alter the schema definitions.
./uc_addresses/uc_addresses_example/uc_addresses_example.install: * Implements hook_schema_alter().
./uc_addresses/uc_addresses_example/uc_addresses_example.install:function uc_addresses_example_schema_alter(&$schema) {
./uc_cck_access/handlers/uc_cck_access_acl.module: * Implements hook_schema_alter().
./uc_cck_access/handlers/uc_cck_access_acl.module:function uc_cck_access_acl_schema_alter(&$schema) {
./uc_disable_product/uc_disable_product.install: * Implementation of hook_schema_alter().
./uc_disable_product/uc_disable_product.install:function uc_disable_product_schema_alter(&$schema) {
./uc_disable_product/uc_disable_product.install:  uc_disable_product_schema_alter($new_schema);
./uc_disable_product/uc_disable_product.install:  uc_disable_product_schema_alter($new_schema);
./uc_endicia/uc_endicia.install: * Implements hook_schema_alter().
./uc_endicia/uc_endicia.install:function uc_endicia_schema_alter(&$schema) {
./uc_mailchimp/uc_mailchimp.module: * Implementation of hook_schema_alter()
./uc_mailchimp/uc_mailchimp.module:function uc_mailchimp_schema_alter(&$schema) {
./uc_product_keys/uc_product_keys_sample/uc_product_keys_sample.install:function uc_product_keys_sample_schema_alter(&$schema)
./url_alias/url_alias.install: * Implements hook_schema_alter().
./url_alias/url_alias.install:function url_alias_schema_alter(&$schema = array()) {
./user_priority_ranking/user_priority_ranking.module: * Implements hook_schema_alter().
./user_priority_ranking/user_priority_ranking.module:function user_priority_ranking_schema_alter(&$schema) {
./user_revision/user_revision.install:  user_revision_schema_alter($schema);
./user_revision/user_revision.install:  user_revision_schema_alter($schema);
./user_revision/user_revision.module:  user_revision_schema_alter($schema);
./user_revision/user_revision.module:  user_revision_schema_alter($schema);
./user_revision/user_revision.module: * Implements hook_schema_alter().
./user_revision/user_revision.module:function user_revision_schema_alter(&$schema) {
./util/contribs/block_tracker/block_tracker.module: * Implements hook_schema_alter().
./util/contribs/block_tracker/block_tracker.module:function block_tracker_schema_alter(&$schema) {
./uuid/uuid.entity.inc: * @see uuid_schema_alter()
./uuid/uuid.install: * @see uuid_schema_alter()
./uuid/uuid.install: * Implements of hook_schema_alter().
./uuid/uuid.install:function uuid_schema_alter(&$schema = array()) {
./uuid_user_revision/uuid_user_revision.install: * Implements hook_schema_alter().
./uuid_user_revision/uuid_user_revision.install:function uuid_user_revision_schema_alter(&$schema) {
./uuid_user_revision/uuid_user_revision.install:  uuid_user_revision_schema_alter($schema);
./uuid_user_revision/uuid_user_revision.install:  uuid_user_revision_schema_alter($schema);
./vimrc/bundle/vim-plugin-for-drupal/tagfiles/drupal7.tags:hook_schema_alter $DRUPAL_ROOT/modules/system/system.api.php /^function hook_schema_alter(&$schema) {$/;" f
./vimrc/bundle/vim-plugin-for-drupal/tagfiles/drupal8.tags:hook_schema_alter $DRUPAL_ROOT/core/modules/system/system.api.php /^function hook_schema_alter(&$schema) {$/;" f
./visitors/visitors_geoip.install:function visitors_geoip_schema_alter(&$schema) {
./webform_ajax/webform_ajax.install: * Implements hook_schema_alter().
./webform_ajax/webform_ajax.install:function webform_ajax_schema_alter(&$schema) {
./webform_ajax/webform_ajax.install:  webform_ajax_schema_alter($schema);
./webform_ajax/webform_ajax.install:  webform_ajax_schema_alter($schema);
./webform_cc/webform_cc.install: * Implementation of hook_schema_alter(). We alter $schema by reference.
./webform_cc/webform_cc.install:function webform_cc_schema_alter(&$schema) {
./webform_chart/webform_chart.install: * Implements hook_schema_alter().
./webform_chart/webform_chart.install:function webform_chart_schema_alter(&$schema) {
./webform_chart/webform_chart.install:  webform_chart_schema_alter($schema);
./webform_chart/webform_chart.install:  webform_chart_schema_alter($schema);
./webform_custom_buttons/webform_custom_buttons.install: * Implements hook_schema_alter().
./webform_custom_buttons/webform_custom_buttons.install:function webform_custom_buttons_schema_alter(&$schema) {
./webform_custom_buttons/webform_custom_buttons.install:  webform_custom_buttons_schema_alter($schema);
./webform_custom_buttons/webform_custom_buttons.install:  webform_custom_buttons_schema_alter($schema);
./webform_entity/webform_entity.install: * Implements hook_schema_alter().
./webform_entity/webform_entity.install:function webform_entity_schema_alter(&$schema) {
./webform_features/webform_features.install: * Implements hook_schema_alter().
./webform_features/webform_features.install:function webform_features_schema_alter(&$schema) {
./webform_features/webform_features.install:  webform_features_schema_alter($schema);
./webform_features/webform_features.install:  webform_features_schema_alter($schema);
./webform_localization/webform_localization.install: * Implements hook_schema_alter().
./webform_localization/webform_localization.install:function webform_localization_schema_alter(&$schema) {
./webform_php/webform_php.install:function webform_php_schema_alter() {
./webform_reply_to/webform_reply_to.install: * Implements hook_schema_alter().
./webform_reply_to/webform_reply_to.install:function webform_reply_to_schema_alter(&$schema) {
./webform_submission_uuid/webform_submission_uuid.install: * Implements hook_schema_alter().
./webform_submission_uuid/webform_submission_uuid.install:function webform_submission_uuid_schema_alter(&$schema) {
./webform_userpoints/webform_userpoints.install: * Implementation of hook_schema_alter().
./webform_userpoints/webform_userpoints.install:function webform_userpoints_schema_alter() {
./workbench_assignee/workbench_assignee.install:* Implements hook_schema_alter()
./workbench_assignee/workbench_assignee.install:function workbench_assignee_schema_alter(&$schema) {
./workbench_moderation_notes/workbench_moderation_notes.install:* Implements hook_schema_alter()
./workbench_moderation_notes/workbench_moderation_notes.install:function workbench_moderation_notes_schema_alter(&$schema) {
./workbench_moderation_types/workbench_moderation_types.install:* Implements hook_schema_alter()
./workbench_moderation_types/workbench_moderation_types.install:function workbench_moderation_types_schema_alter(&$schema) {
./wow/modules/wow_guild/wow_guild.install: * Implements hook_schema_alter().
./wow/modules/wow_guild/wow_guild.install:function wow_guild_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_alt/wysiwyg_imageupload_alt.install:function wysiwyg_imageupload_alt_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_caption/wysiwyg_imageupload_caption.install:function wysiwyg_imageupload_caption_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_colorbox/wysiwyg_imageupload_colorbox.install:function wysiwyg_imageupload_colorbox_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_fancybox/wysiwyg_imageupload_fancybox.install:function wysiwyg_imageupload_fancybox_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_lightbox/wysiwyg_imageupload_lightbox.install:function wysiwyg_imageupload_lightbox_schema_alter(&$schema) {
./wysiwyg_imageupload/modules/wysiwyg_imageupload_shadowbox/wysiwyg_imageupload_shadowbox.install:function wysiwyg_imageupload_shadowbox_schema_alter(&$schema) {

There may be a few false-positives in that list, but it's still quite significant.

Given that, I don't see how we can possibly just remove this hook willy-nilly. We need to ensure core supports those modules' use cases before we can commit something like this. Postponing on whatever sub-issues are needed to make that happen.

BTMash’s picture

Adding the catalyst relationship to the issue - if field schemas cannot be altered, then regular module schemas should not be alterable (as same sets of concerns apply). If regular module schemas can be altered, then field schemas should be alterable.

Dave Reid’s picture

Am I the only one that thinks that altering normal schema is fine and not being able to alter field schema is fine as well? Stuff in hook_schema() I know is a database table. Stuff in hook_field_schema() I am not sure where it will live (but could be database), so I can assume I cannot alter it. I'm absolutely fine with that assumption and see no need why we can't just live with that documented?

Crell’s picture

A design goal of Drupal 8 is no assumption of SQL. Modules should not be altering table definitions willy nilly because core makes absolutely no promise whatsoever that it's using an SQL database, from any vendor. Modules that hard-code themselves to SQL are, IMO, "doing it wrong".

All entity storage could be in non-SQL. Most config is now CMI, which is YAML. State is now the State API, which is key/value and could (probably should) be Mongo or Redis, not SQL, if available. ctools-ish cases are Config Entities (CMI (YAML)). Queue has always supported non-SQL. Even Batch API is, via some trickery, not SQL-dependent. I don't think there are any systems remaining that you can rely on being SQL, and that's by design.

Dave: I've long argued that bundle-able and non-bundle-able entities were a stupid split to make, so you don't need to work very hard to convince me that users should be bundleable. :-)

Dave Reid’s picture

Why do we even have hook_schema() then? It naturally assumes SQL.

Crell’s picture

catch’s picture

So there's two reasons to use hook_schema_alter():

* Modify the behaviour of drupal_write_record() and drupal_schema_field_sql().

* Document schema modifcations that aren't anything to do with dwr() dsfs(), just so that your site still validates with https://drupal.org/project/schema

In both cases to modify the actual database schema, you have to call db_*() functions directly to make those changes, hook_schema_alter() is not called when a module's schema actually gets installed.

For dwr() dsfs() this is the last refuge of the desperate - i.e. when you want to add a feature to another module and there's no other place to make the change. It's all very well to not like 'last resort of the desperate' type hooks, but webchick's list shows us that there's plenty of desperate people out there we gave refuge to.

For schema module, we're already in the situation with field and cache tables (and soon more) never end up in hook_schema(). A contrib module or http://drupal.org/project/schema could add them back dynamically via hook_schema_alter() though, so that they validate. I've personally done this when I add a custom index on client sites - just provides a place other than the update handler to document the hack, but schema module could provide that hook just as well for that case so it's not really an argument either way.

@Dave Reid's use case looks to me like a similar one to the hook implementations webchick pasted - needing to alter the base tables of an entity since there's no other nice way to get the extra information as a base property - this is particularly the case when it comes to bundles, since field_attach_load() gets called before hook_entity_load().

After #1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions we should be close to a situation where the schema of content entities could be altered within the entity system, rather than via hook_schema_alter(). If that's the case, then the file entity, as well as most of the implementations that webchick found ought to be covered. But yeah this isn't really viable to remove until that's done and demonstrated to work.

plach’s picture

I definitely hope that after #1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions adding a base or custom field will be just matter of providing its entity field definition. At least that's the goal.

However keep in mind that, unless something changes, core won't support altering entity schema when there is already data stored. We should definitely be able to write the proper migrations to move data from the old schema to the new one, but that is likely to require a contrib module, which would become a dependency to install File entity on an existing site.

mgifford’s picture

#1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions is now in.

Is adding a base or custom field just matter of providing its entity field definition?