blob: 78c146887621203a5b391ced54a06a0bbd7a0f0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
dbname="passman"
echo "Name of database to use [$dbname]:"
read x
if [ "$x" ] ; then
dbname=$x
fi
script=/tmp/$$
rm -f $script
touch $script
cat >> $script << END_OF_SQL
use $dbname;
alter table pm_store add column display int not null;
update pm_store set display = id;
END_OF_SQL
cat -n $script
mysql -u root -p < $script
rm -f $script
|