Mercurial > hg > egg-tcls
view create_feeds_db.tcl @ 539:c9dc79874939
utillib: Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 07 Jul 2020 22:08:43 +0300 |
parents | 1255d524a919 |
children | 47c174bfd9a2 |
line wrap: on
line source
#!/usr/bin/tclsh # TCL script for creating (empty) Feeds SQLite3 database # # Written by Matti 'ccr' Hamalainen <ccr@tnsp.org> # (C) Copyright 2013 Tecnic Software productions (TNSP) # package require sqlite3 source [file dirname [info script]]/utillib.tcl set db_create_desc "Creates tables for Feeds.tcl in target SQLite3 file" set db_table_list {feeds} proc db_create_table { dbh utable } { utl_create_table dbh "$utable" "id INTEGER PRIMARY KEY AUTOINCREMENT, utime INT, utext VARCHAR(2048), user VARCHAR(32), host VARCHAR(256), chan VARCHAR(32)" } proc db_drop_table { dbh utable } { utl_drop_table dbh "$utable" } proc db_get_table_list { utable } { return [list $utable] } source [file dirname [info script]]/utilcreate.tcl