This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All tables have a user_id column, and the keyspace is sharded by this column. | |
CREATE TABLE `products` ( | |
`id` BIGINT NOT NULL, | |
`user_id` BIGINT NOT NULL, | |
PRIMARY KEY (`id`) | |
) | |
CREATE TABLE `orders` ( | |
`id` BIGINT NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Warn before pushing to protected branches | |
# Make script executable with chmod +x pre-push | |
# Bypass with git push --no-verify | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
PROTECTED_BRANCHES="^(master|dev|release-*|patch-*)" | |
if [[ "$BRANCH" =~ $PROTECTED_BRANCHES ]]; then | |
read -p "Are you sure you want to push to \"$BRANCH\" ? (y/n): " -n 1 -r < /dev/tty |