summaryrefslogtreecommitdiff
path: root/update_access_right_table.tcl
blob: bc6da2cb00bb618242ed46b7809f06a1dc25eb5e (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
27
28
29
30
#!/bin/sh
# FILE: "/home/evmik/src/my_src/GradeBook/update_access_right_table.tcl"
# LAST MODIFICATION: "Wed, 02 Feb 2011 12:03:18 -0500 (evmik)"
# (C) 2011 by Eugeniy Mikhailov, <evgmik@gmail.com>
# $Id:$
# vim:set ft=tcl: \
exec tclsh "$0" "$@"

package require sqlite3
package require md5
source ./GradeBook_lib.tcl

if { $argc < 1 } {	
	puts {Updates access rights table according to the new library defaults.}
	puts {Usage:}
	puts "$argv0 database_name"
	exit
}

set dbfile [lindex $argv 0] 
sqlite3 db $dbfile

if { [catch {db eval {drop table AccessRightsTable}} errMsg ] } { 
	puts "The following error happened: $errMsg"
}
CreateAccessRightsTable db

db close

# vim: ts=2 sw=2 foldmethod=indent: