diff options
author | Ian C <ianc@noddybox.co.uk> | 2018-07-07 13:26:02 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2018-07-07 13:26:02 +0000 |
commit | 62d926e022aaf35be029f20568e55533caee3bf7 (patch) | |
tree | 58b4dcb2de9f91f7af0f1b5893cea5aa07d7a4ea /sql/upgrade_from_1.0_to_1.1.sh | |
parent | 9bd1ad2bfb807d7714e17112a9dc51f2416a1e6c (diff) |
Added up/down links to reorder entries.
Diffstat (limited to 'sql/upgrade_from_1.0_to_1.1.sh')
-rwxr-xr-x | sql/upgrade_from_1.0_to_1.1.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/upgrade_from_1.0_to_1.1.sh b/sql/upgrade_from_1.0_to_1.1.sh new file mode 100755 index 0000000..78c1468 --- /dev/null +++ b/sql/upgrade_from_1.0_to_1.1.sh @@ -0,0 +1,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 |