added triggers for fk
authorMarius Sandu-Popa <sandupopamarius@gmail.com>
Sat, 24 Oct 2009 03:03:18 +0000 (06:03 +0300)
committerMarius Sandu-Popa <sandupopamarius@gmail.com>
Sat, 24 Oct 2009 03:03:18 +0000 (06:03 +0300)
auto/bd/build_db
auto/sql/p2p-log-sqlite.sql

index 11fae4a..17326ef 100755 (executable)
@@ -66,15 +66,15 @@ curs.execute('''create table verbose_messages (
                listen_port integer check(listen_port between 1 and 65535)
                )''')
 
-for t in [('1', 'mumu', '1024', 'ceva', 'URL'),
-       ('2', 'gugu', '1024', 'ceva', 'URL'),
-       ('3', 'gaga', '1024', 'ceva', 'URL'),
-       ]:
-       curs.execute('insert into swarms values (?,?,?,?,?)', t)
-conn.commit()
+#for t in [('1', 'mumu', '1024', 'ceva', 'URL'),
+#      ('2', 'gugu', '1024', 'ceva', 'URL'),
+#      ('3', 'gaga', '1024', 'ceva', 'URL'),
+#      ]:
+#      curs.execute('insert into swarms values (?,?,?,?,?)', t)
+#conn.commit()
 
-curs.execute('select * from swarms')
-for row in curs:
-       print row
-       
-conn.close()
\ No newline at end of file
+#curs.execute('select * from swarms')
+#for row in curs:
+#      print row
+#      
+#conn.close()
\ No newline at end of file
index 29843b6..81af91c 100644 (file)
@@ -46,10 +46,12 @@ create table status_messages (
 create table verbose_messages (
        cs_id integer references client_session(id),
        timestamp date,
-       peer_ip integer,
+       peer_ip text,
        peer_port integer check(peer_port between 1 and 65535),
        message_type integer,
        _index integer,
        begin integer,
        length integer,
        listen_port integer check(listen_port between 1 and 65535));
+
+.genfkey --exec
\ No newline at end of file