Skip to content

Question Regarding Shard Keys #53

Answered by carlsverre
devingray asked this question in Q&A
Discussion options

You must be logged in to vote

It seems like the correct answer is something like this:

            $table->bigIncrements('id')->withoutPrimaryKey()->index();
            $table->unsignedBigInteger('user_id')->shardKey();
            $table->string('template_id');
            $table->longText('data');
            $table->string('response_status_code');
            $table->longText('response_message');
            $table->timestamps();

Added as a test for future reference:
e6fd63b#diff-f6da6c22d5e74ab81179bda2693633c2fb36619a61c3d97f857875f906c8fa1bR59

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlsverre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants