Commit bd42e765 authored by Pavel Vainerman's avatar Pavel Vainerman

(LogDB): добавил утилиту создания db (uniset2-logdb-create)

parent 6a099370
......@@ -2,6 +2,8 @@ if DISABLE_SQLITE
else
bin_SCRIPTS = @PACKAGE@-logdb-create
bin_PROGRAMS = @PACKAGE@-logdb
@PACKAGE@_logdb_LDADD = $(top_builddir)/extensions/DBServer-SQLite/libUniSet2-sqlite.la $(top_builddir)/lib/libUniSet2.la
@PACKAGE@_logdb_CXXFLAGS = $(SQLITE3_CFLAGS) -I$(top_builddir)/extensions/DBServer-SQLite
......
#!/bin/sh
dbname=test.db
[ -n "$1" ] && dbname="$1"
usage()
{
echo "Usage: ${0##*/} dbfile"
}
sqlite3 $dbname <<"_EOF_"
[ -z "$1" ] && usage && exit 1
dbfile="$1"
[ -a "$dbfile" ] && echo "$dbfile already exists.." && exit 1
sqlite3 $dbfile <<"_EOF_"
PRAGMA foreign_keys=ON;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment