klmr92 / uguu

Automatically exported from code.google.com/p/uguu
Other
0 stars 1 forks source link

dbinit.py safety for already installed databases; changeable known_filetypes #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First of all, dbinit.py could be executed mistakenly by administrator and
it will drop all tables (may be, with scanned data inside).
We should think about some key (not too short) to drop tables (otherwise
script should exit roll-backing transaction).

Also, it will be good to make known_filetypes (and, may be,
known_protocols) to be changeable, so dbinit.py could update types in
database if it exists.

For example, we could use the following scheme:
dbinit.py : update any valuable info from common.py
dbinit.py --init : initialize database
dbinit.py --drop : drop everything
dbinit.py --drop-and-init : drop and initialize database

Original issue reported on code.google.com by radist...@gmail.com on 5 Feb 2010 at 2:04

GoogleCodeExporter commented 9 years ago

Original comment by radist...@gmail.com on 5 Feb 2010 at 2:04

GoogleCodeExporter commented 9 years ago
Seems like postgresql doesn't allow to change enum types via standard queries.
We should whether drop the possibility to change file types after database 
creation,
or use integers instead of filetype enum. I think, the former way is better. 
So, I'll
close this issue if no objection will appear today.

Original comment by radist...@gmail.com on 15 Feb 2010 at 7:47

GoogleCodeExporter commented 9 years ago

Original comment by radist...@gmail.com on 15 Feb 2010 at 7:47

GoogleCodeExporter commented 9 years ago
see changeset revision 5934df932b

Original comment by radist...@gmail.com on 15 Feb 2010 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by radist...@gmail.com on 16 Mar 2010 at 6:16