<?php

declare(strict_types = 1);

// @codingStandardsIgnoreFile
/**
 * @file
 * A database agnostic dump for testing purposes.
 *
 * This file was generated by the Drupal 8.0 db-tools.php script.
 */

use Drupal\Core\Database\Database;

$connection = Database::getConnection();

$connection->schema()->createTable('sms_user', array(
  'fields' => array(
    'uid' => array(
      'type' => 'int',
      'not null' => TRUE,
      'size' => 'normal',
      'unsigned' => TRUE,
    ),
    'number' => array(
      'type' => 'varchar',
      'not null' => TRUE,
      'length' => '32',
    ),
    'status' => array(
      'type' => 'int',
      'not null' => TRUE,
      'size' => 'normal',
      'unsigned' => TRUE,
    ),
    'code' => array(
      'type' => 'varchar',
      'not null' => FALSE,
      'length' => '16',
      'default' => '',
    ),
    'gateway' => array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'normal',
    ),
    'sleep_enabled' => array(
      'type' => 'int',
      'not null' => TRUE,
      'size' => 'tiny',
      'default' => '0',
      'unsigned' => TRUE,
    ),
    'sleep_start_time' => array(
      'type' => 'int',
      'not null' => FALSE,
      'size' => 'tiny',
      'default' => '0',
      'unsigned' => TRUE,
    ),
    'sleep_end_time' => array(
      'type' => 'int',
      'not null' => FALSE,
      'size' => 'tiny',
      'default' => '0',
      'unsigned' => TRUE,
    ),
    'sms_user_opt_out' => array(
      'type' => 'int',
      'not null' => TRUE,
      'size' => 'tiny',
      'default' => '0',
      'unsigned' => TRUE,
    ),
  ),
  'primary key' => array(
    'number',
  ),
  'indexes' => array(
    'uid' => array(
      'uid',
    ),
  ),
  'mysql_character_set' => 'utf8',
));

$connection->insert('sms_user')
->fields(array(
  'uid',
  'number',
  'status',
  'code',
  'gateway',
  'sleep_enabled',
  'sleep_start_time',
  'sleep_end_time',
  'sms_user_opt_out',
))
->values(array(
  'uid' => '40',
  'number' => '1234567890',
  'status' => '2',
  'code' => '8309',
  'gateway' => 'a:0:{}',
  'sleep_enabled' => '1',
  'sleep_start_time' => '12',
  'sleep_end_time' => '16',
  'sms_user_opt_out' => '1',
))
->values(array(
  'uid' => '41',
  'number' => '87654321190',
  'status' => '1',
  'code' => '8002',
  'gateway' => 'a:0:{}',
  'sleep_enabled' => '0',
  'sleep_start_time' => '0',
  'sleep_end_time' => '0',
  'sms_user_opt_out' => '0',
))
->execute();

$connection->insert('users')
->fields(array(
  'uid',
  'name',
  'pass',
  'mail',
  'created',
  'access',
  'login',
  'status',
  'init',
))
->values(array(
  'uid' => '40',
  'name' => 'joe',
  'pass' => '$S$D/HVkgCg1Hvi7DN5KVSgNl.2C5g8W6oe/OoIRMUlyjkmPugQRhoB',
  'mail' => 'joe@localhost',
  'created' => '1505771205',
  'access' => '1505772205',
  'login' => '1505771593',
  'status' => '1',
  'init' => 'joe@localhost',
))
->values(array(
  'uid' => '41',
  'name' => 'jill',
  'pass' => '$S$DGFZUE.FhrXbe4y52eC7p0ZVRGD/gOPtVctDlmC89qkujnBokAlJ',
  'mail' => 'jill@example.com',
  'created' => '1391150052',
  'access' => '1391259672',
  'login' => '1391152253',
  'status' => '1',
  'init' => 'jill@example.com',
))
->values(array(
  'uid' => '42',
  'name' => 'jack',
  'pass' => '$S$DGFZUE.FhrXbe4y52eC7p0ZVRGD/gOPtVctDlmC89qkujnBokAlJ',
  'mail' => 'jack@example.com',
  'created' => '1391150053',
  'access' => '1391259673',
  'login' => '1391152254',
  'status' => '1',
  'init' => 'jack@example.com',
))
->execute();
