Project

General

Profile

« Previous | Next » 

Revision 364

Moved vegbien CREATE DATABASE command to Makefile and run vegbien.sql as bien user

View differences:

Makefile
108 108

  
109 109
postgres_user: _not_file
110 110
	-echo "CREATE USER bien PASSWORD '$(bienPassword)';"|$(psqlAsAdmin)
111
# ignore errors about user existing
111
# ignore errors if user exists
112 112

  
113 113
rm_postgres_user: _not_file
114 114
	echo "DROP USER IF EXISTS bien;"|$(psqlAsAdmin)
......
116 116
#####
117 117

  
118 118
db: _not_file
119
	$(psqlAsAdmin) <mappings/schemas/vegbien.sql
119
	-echo "CREATE DATABASE vegbien OWNER bien ENCODING 'UTF8';"|$(psqlAsAdmin)
120
	$(psqlAsBien) <mappings/schemas/vegbien.sql
121
# ignore errors if database exists
120 122

  
121 123
rm_db: _not_file
122 124
	echo "DROP DATABASE IF EXISTS vegbien;"|$(psqlAsAdmin)
......
161 163

  
162 164
mysql_user: _not_file
163 165
	-$($@_cmd)
164
# ignore errors about user existing
166
# ignore errors if user exists
165 167
mysql_user_cmd = echo "CREATE USER 'bien'@'localhost' IDENTIFIED BY \
166 168
'$(bienPassword)';"|$(mysqlAsRoot)
167 169

  
168 170
rm_mysql_user: _not_file
169 171
	-echo "DROP USER 'bien'@'localhost';"|$(mysqlAsRoot)
170
# ignore errors about user not existing
172
# ignore errors if user exists
171 173

  
172 174
#####
173 175

  

Also available in: Unified diff