You are here

function nodeviewcount_update_8101 in Node view count 8

Create user IP field in database.

File

./nodeviewcount.install, line 64
Install, update and uninstall functions for the nodeviewcount module.

Code

function nodeviewcount_update_8101() {
  $field = [
    'description' => 'IP address of a user who viewed the node.',
    'type' => 'varchar',
    'length' => 100,
    'not null' => TRUE,
    'default' => 0,
  ];
  $schema = Database::getConnection()
    ->schema();
  $schema
    ->addField('nodeviewcount', 'uip', $field);
}