mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	This is preparation for supporting using Python 3 in production. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
		
			
				
	
	
		
			22 lines
		
	
	
		
			541 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			541 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
set -e
 | 
						|
set -x
 | 
						|
 | 
						|
"$(dirname "$0")/../scripts/setup/terminate-psql-sessions" zulip zulip zulip_base
 | 
						|
 | 
						|
psql -h localhost postgres zulip <<EOF
 | 
						|
DROP DATABASE IF EXISTS zulip;
 | 
						|
CREATE DATABASE zulip TEMPLATE zulip_base;
 | 
						|
EOF
 | 
						|
 | 
						|
sh "$(dirname "$0")/../scripts/setup/flush-memcached"
 | 
						|
 | 
						|
./manage.py migrate --noinput
 | 
						|
./manage.py createcachetable third_party_api_results
 | 
						|
./manage.py populate_db -n100 --threads=1
 | 
						|
# Ensure that the local user's API key is synced from ~/.zuliprc
 | 
						|
 | 
						|
if [ -e ~/.zuliprc ]; then
 | 
						|
    ./manage.py sync_api_key
 | 
						|
fi
 |