/usr/share/doc/tclodbc/examples/loaddef.tcl is in tclodbc 2.5.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 | ####################################################################
#
# loaddef.tcl
#
# Loads data definitions from every table of the database from a file
# named db.def. The sql statements are stored to file named db.sql.
#
# Uses utility procedure TableDefToSql in file datautil.tcl
#
# Create the db, if not yet created.
set dir [file dirname [info script]]
source $dir/createdb.tcl
####################################################################
#
# Execution starts here
#
# delete tables, if exists
puts "dropping all tables..."
foreach i [db tables] {
# exclude system tables
if {![string compare [lindex $i 3] TABLE]} {
db "drop table [lindex $i 2]"
}
}
puts "drop completed"
puts "loading..."
tclodbc::LoadSchema db db.def yes
puts "load complete"
|