You are here

function view_custom_table_update_8101 in Views Custom Table 8

Same name and namespace in other branches
  1. 9.0.x view_custom_table.install \view_custom_table_update_8101()

Add 'table_database' column so tables from other database can be implemented.

File

./view_custom_table.install, line 13
Installation functions for the View Custom Table module.

Code

function view_custom_table_update_8101() {
  $table_database = [
    'description' => 'Database of the table.',
    'type' => 'varchar',
    'length' => 100,
    'not null' => TRUE,
    'default' => 'default',
  ];
  $schema = Database::getConnection()
    ->schema();
  $schema
    ->addField('custom_table_view_data', 'table_database', $table_database);
}