Skip to content
Snippets Groups Projects
Commit 0222fa70 authored by Angie Byron's avatar Angie Byron
Browse files

#970002 by EclipseGc: Fixed file field foreign key table is incorrect

parent 17c6a912
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -13,7 +13,7 @@ function file_field_schema($field) { ...@@ -13,7 +13,7 @@ function file_field_schema($field) {
return array( return array(
'columns' => array( 'columns' => array(
'fid' => array( 'fid' => array(
'description' => 'The {files}.fid being referenced in this field.', 'description' => 'The {file_managed}.fid being referenced in this field.',
'type' => 'int', 'type' => 'int',
'not null' => FALSE, 'not null' => FALSE,
'unsigned' => TRUE, 'unsigned' => TRUE,
...@@ -37,7 +37,7 @@ function file_field_schema($field) { ...@@ -37,7 +37,7 @@ function file_field_schema($field) {
), ),
'foreign keys' => array( 'foreign keys' => array(
'fid' => array( 'fid' => array(
'table' => 'file', 'table' => 'file_managed',
'columns' => array('fid' => 'fid'), 'columns' => array('fid' => 'fid'),
), ),
), ),
......
...@@ -114,7 +114,7 @@ function image_field_schema($field) { ...@@ -114,7 +114,7 @@ function image_field_schema($field) {
return array( return array(
'columns' => array( 'columns' => array(
'fid' => array( 'fid' => array(
'description' => 'The {files}.fid being referenced in this field.', 'description' => 'The {file_managed}.fid being referenced in this field.',
'type' => 'int', 'type' => 'int',
'not null' => FALSE, 'not null' => FALSE,
'unsigned' => TRUE, 'unsigned' => TRUE,
...@@ -135,6 +135,12 @@ function image_field_schema($field) { ...@@ -135,6 +135,12 @@ function image_field_schema($field) {
'indexes' => array( 'indexes' => array(
'fid' => array('fid'), 'fid' => array('fid'),
), ),
'foreign keys' => array(
'fid' => array(
'table' => 'file_managed',
'columns' => array('fid' => 'fid'),
),
),
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment