Mercurial > hg > egg-tcls
changeset 257:4abc5366866c
Remove creation script.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 23 Jan 2015 09:22:44 +0200 |
parents | f3906e583798 |
children | 599b90e41c03 |
files | create_spede_mn_tuksu.tcl |
diffstat | 1 files changed, 0 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/create_spede_mn_tuksu.tcl Fri Jan 23 09:21:25 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -#!/usr/bin/tclsh -# TCL script for creating (empty) Spede, MN and Tuksu databases -# -# Written by Matti 'ccr' Hamalainen <ccr@tnsp.org> -# (C) Copyright 2011 Tecnic Software productions (TNSP) -# -package require sqlite3 -source [file dirname [info script]]/util_convert.tcl - -set db_list {spededb tuksudb mndb} - -### Check commandline arguments -set db_str [join $db_list ", "] -if {$argc < 1} { - puts "Creates tables for $db_str in target SQLite3 file" - puts "Usage: $argv0 <output_sqlite3_db_file> \[-drop\]" - puts "" - puts "-drop option will drop any existing tables of same name." - exit 0 -} - -set db_drop 0 -set db_output [lindex $argv 0] -if {$argc >= 2 && [lindex $argv 1] == "-drop"} { - set db_drop 1 -} - -### Open database -open_db $db_output - -if {$db_drop} { - puts "WARNING! Dropping of old table(s) '$db_str' requested!" - puts "All data in those tables will be permanently lost!" - - if {![confirm_yesno "Proceed"]} { - puts "Aborting procedure." - dbh close - exit 0 - } - - foreach i $db_list { - drop_table $i - } -} - -puts "Creating tables $db_str ..." -foreach i $db_list { - create_table_quotes_votes $i 0 -} - -dbh close - -puts "DONE."