After running tests I see a number of field_config_entity_type left behind.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 373763-field-sql-storage-uninstall-D7.patch | 941 bytes | dave reid |
| #6 | 373763-field-sql-storage-uninstall-D7.patch | 805 bytes | dave reid |
After running tests I see a number of field_config_entity_type left behind.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 373763-field-sql-storage-uninstall-D7.patch | 941 bytes | dave reid |
| #6 | 373763-field-sql-storage-uninstall-D7.patch | 805 bytes | dave reid |
Comments
Comment #2
dave reidI'm guessing because field_sql_storage_schema() does a check for
db_table_exists('field_config')during field_sql_storage_uninstall(), the field_config tables have already been removed, so that part of the schema does not get removed.Comment #3
boombatower commentedNarrowed it down to tearDown() in the DrupalWebTestCase.
The drupal_get_schema(NULL, TRUE); call doesn't return the table.
Comment #4
boombatower commentedCross-post
Comment #5
bjaspan commentedThe field_config_entity_type is currently owned by field_sql_storage.module. I don't know why it wouldn't be dropped when that module is uninstalled.
I can't decide if that table and the function that populates it (_field_sql_storage_etid()) should be part of field.module or not. Other storage engines may not have any need to map entity types to ids, suggesting it belongs in field_sql_storage. However, any storage engine that uses the SQL database will need it, so not having it in field.module potentially causes duplicate code.
Comments welcome.
Comment #6
dave reidSo...I can't believe it was this obvious:
Comment #7
dave reidComment #8
boombatower commentedFixes issue...wait for test results to confirm, but looks good.
Thanks for tracking that down Dave.
Comment #9
dave reidFor some reason now I'm getting just two tables left over after running the field tests:
simpletest792411field_data_revision_test_field_name
simpletest792411field_data_test_field_name
Investigating further to see why those aren't being removed now.
Comment #10
dave reidManaged to find what was going on. The two tables that were being left over was caused by the test FieldTestCase->testDeleteField where a field is marked as 'deleted' but the FieldAPI does not actually remove the tables. Then, in field_sql_storage_schema(), the function field_read_fields() is called to get all the field tables, but that function, by default does not include 'deleted' or 'inactive' fields. Luckily, there's an easy parameter change and all the tables uninstall cleanly now!
Comment #11
boombatower commentedAgain, thanks for tracking that down.
Comment #12
bjaspan commentedBoth changes look good. The first is an obvious bug, and for the second: deleted fields are supposed to be invisible to Field API callers but the tables do in fact still exist and so ought to be reported in the schema. RTBC.
Comment #13
boombatower commentedFor anyone committing I believe you need #6 and #10.
Comment #14
dave reidActually, #10 contains the change in #6, so only #10 is needed.
Comment #15
boombatower commented@#14 ahh..didn't see that before...it was late last night, guess I missed it.
Comment #16
webchickCommitted to HEAD. Thanks!