Batch Create Table

Last updated: 2019-08-08 13:03:10


Batch Table Creation

This document describes how to create TcaplusDB tables for your game after the service is activated.


You have activated Tcaplus for your game.


Common table management operations in TcaplusDB include batch creation, batch modification, batch deletion, batch scaling and batch unarchive.
TcaplusDB supports batch creation of tables. Follow the steps below:

  1. Click Add tables to enter the table creation page.

  2. Select the deployment unit. If there is no deployment unit, you will need to create one. Click New Deployment Unit and enter the name as needed.

    The table structure is defined by the proto file. Before creating the table, you must understand TcaplusDB’s table definition rules. See Proto Table Creation File

The following is an example of a proto file.

// tb_online.proto
syntax = "proto2";
package myTcaplusTable;

import "tcaplusservice.optionv1.proto";

message tb_online {
    option(tcaplusservice.tcaplus_primary_key) = "uin,name,region";

    required int64 uin = 1; 
    required string name = 2; 
    required int32 region = 3;

    required int32 gamesvrid = 4; 
    optional int32 logintime = 5 [default = 1];
    repeated int64 lockid = 6 [packed = true]; 
    optional bool is_available = 7 [default = false]; 
    optional pay_info pay = 8; 

message pay_info { 

    required int64 pay_id = 1;
    optional uint64 total_money = 2;
    optional uint64 pay_times = 3;
    optional pay_auth_info auth = 4;

    message pay_auth_info { 
        required string pay_keys = 1;
        optional int64 update_time = 2;
  1. Click Local File to select local files to upload. If you have uploaded a file, click Import From History File to add a file, and then click Next.

    Only Proto file format is supported and the file size cannot exceed 2 MB.

  2. Set the table information. Select the table to be set, set Storage, Reserved Read and Reserved Write as needed, and click Next.

  3. Confirm the table information, and then click Create.

  4. The system will return a success message when the table is successfully created.