vitess.io/vitess@v0.16.2/go/test/endtoend/vtgate/schema.sql (about)

     1  create table t1
     2  (
     3      id1 bigint,
     4      id2 bigint,
     5      primary key (id1)
     6  ) Engine = InnoDB;
     7  
     8  create table t1_id2_idx
     9  (
    10      id2         bigint,
    11      keyspace_id varbinary(10),
    12      primary key (id2)
    13  ) Engine = InnoDB;
    14  
    15  create table vstream_test
    16  (
    17      id  bigint,
    18      val bigint,
    19      primary key (id)
    20  ) Engine = InnoDB;
    21  
    22  create table t2
    23  (
    24      id3 bigint,
    25      id4 bigint,
    26      primary key (id3)
    27  ) Engine = InnoDB;
    28  
    29  create table t2_id4_idx
    30  (
    31      id  bigint not null auto_increment,
    32      id4 bigint,
    33      id3 bigint,
    34      primary key (id),
    35      key idx_id4 (id4)
    36  ) Engine = InnoDB;
    37  
    38  create table t3
    39  (
    40      id5 bigint,
    41      id6 bigint,
    42      id7 bigint,
    43      primary key (id5)
    44  ) Engine = InnoDB;
    45  
    46  create table t3_id7_idx
    47  (
    48      id  bigint not null auto_increment,
    49      id7 bigint,
    50      id6 bigint,
    51      primary key (id)
    52  ) Engine = InnoDB;
    53  
    54  create table t4
    55  (
    56      id1 bigint,
    57      id2 varchar(10),
    58      primary key (id1)
    59  ) ENGINE = InnoDB
    60    DEFAULT charset = utf8mb4
    61    COLLATE = utf8mb4_general_ci;
    62  
    63  create table t4_id2_idx
    64  (
    65      id2         varchar(10),
    66      id1         bigint,
    67      keyspace_id varbinary(50),
    68      primary key (id2, id1)
    69  ) Engine = InnoDB
    70    DEFAULT charset = utf8mb4
    71    COLLATE = utf8mb4_general_ci;
    72  
    73  create table t5_null_vindex
    74  (
    75      id  bigint not null,
    76      idx varchar(50),
    77      primary key (id)
    78  ) Engine = InnoDB;
    79  
    80  create table t6
    81  (
    82      id1 bigint,
    83      id2 varchar(10),
    84      primary key (id1)
    85  ) Engine = InnoDB;
    86  
    87  create table t6_id2_idx
    88  (
    89      id2         varchar(10),
    90      id1         bigint,
    91      keyspace_id varbinary(50),
    92      primary key (id1),
    93      key (id2)
    94  ) Engine = InnoDB;
    95  
    96  create table t7_xxhash
    97  (
    98      uid   varchar(50),
    99      phone bigint,
   100      msg   varchar(100),
   101      primary key (uid)
   102  ) Engine = InnoDB;
   103  
   104  create table t7_xxhash_idx
   105  (
   106      phone       bigint,
   107      keyspace_id varbinary(50),
   108      primary key (phone, keyspace_id)
   109  ) Engine = InnoDB;
   110  
   111  create table t7_fk
   112  (
   113      id     bigint,
   114      t7_uid varchar(50),
   115      primary key (id),
   116      CONSTRAINT t7_fk_ibfk_1 foreign key (t7_uid) references t7_xxhash (uid)
   117          on delete set null on update cascade
   118  ) Engine = InnoDB;
   119  
   120  create table t8
   121  (
   122      id        bigint,
   123      t9_id     bigint DEFAULT NULL,
   124      parent_id bigint,
   125      primary key (id)
   126  ) Engine = InnoDB;
   127  
   128  create table t9
   129  (
   130      id        bigint,
   131      parent_id bigint,
   132      primary key (id)
   133  ) Engine = InnoDB;
   134  
   135  create table t9_id_to_keyspace_id_idx
   136  (
   137      id          bigint,
   138      keyspace_id varbinary(10),
   139      primary key (id)
   140  ) Engine = InnoDB;
   141  
   142  create table t10
   143  (
   144      id           bigint,
   145      sharding_key bigint,
   146      primary key (id)
   147  ) Engine = InnoDB;
   148  
   149  create table t10_id_to_keyspace_id_idx
   150  (
   151      id          bigint,
   152      keyspace_id varbinary(10),
   153      primary key (id)
   154  ) Engine = InnoDB;