Projects tagged ‘compare’ and ‘python’


[4 total ]

1 Users

This is a command line tool written in Python. It displays all the differences between two database schemas. The schema are provided as SQL dump. 1. ExampleInputdb1.sql: sql dump of a database with ... [More] a single table: 'person' CREATE TABLE `person` ( `last name` varchar(50) NOT NULL, `date_of_birth` varchar(45) NOT NULL, PRIMARY KEY (`last name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;db2.sql: sql dump of the same database after adding a new table 'car' and modified fields in the 'person' table. CREATE TABLE `car` ( `color` varchar(50) NOT NULL, `number_plate` varchar(50) NOT NULL, `brand` varchar(50) NOT NULL, PRIMARY KEY (`number_plate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `person` ( `last name` varchar(50) NOT NULL, `date_of_birth` datetime NOT NULL, `first_name` varchar(45) NOT NULL, PRIMARY KEY (`last name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;Commandpython compdb.py db1.sql db2.sqlOutput% FIELD: person.date_of_birth `date_of_birth` varchar(45) NOT NULL => `date_of_birth` datetime NOT NULL + FIELD: person.`first_name` varchar(45) NOT NULL + TABLE: car 3 difference(s).2. Notation%: difference +: new field or table -: missing field or table 3. LimitationsCurrently works only with MySQL dumps Obviously this tool cannot detect when the name of a field or a table has changed! 4. MotivationThis script was originally written to help me keep track of the evolution of Django models (hence the Python implementation). Before upgrading a staging server, I would compare the SQL dump from my development database (generated with mysqldump -d or with python manage.py sql) with the dump from my staging server. Note that more sophisticated tools have been developed for this purpose, search for 'django schema evolution' on any search engine to find them. This tool was developed as part of a UML to Django conversion project. 5. FeedbackYour comments and contributions are welcome. [Less]
Created 4 months ago.

0 Users

NetFdiff is free, open source software for a doing simple housekeeping of a web site. It is available for Mac OS X, Microsoft Windows, GNU/Linux, and other operating systems. NetFdiff will help for ... [More] the following tasks: Comparing directory structures between the local disk and the remote web site. Uploading and Downloading files Uploading recently modified files NetFdiff has been tested with directory structures containing more than 5000 files. Requirements To use NetFdiff, you need: Python language installed on your local computer (version 2.4 or later) PHP scripting enabled on the web server FTP enabled for transfering files to/from the web server Learn more at http://fhoerni.free.fr/netfdiff/ [Less]
Created 12 months ago.

0 Users

Update 2009 June 29: I'm currently looking forward to wxPython to get compatible with Python 3.0 to do bugfixes and probably code refactoring (saves much effort due to better string/unicode support in ... [More] Python itself). But the last release should be pretty stable per feedback from users. Please note that DirCompare.rc file under the installation path is the configuration file! I'm following the Linux convention here! It's more useful than I thought after I invented this. - the Author of DirCompare 它比我当初设想的更为有用。 - 作者 To Windows users: Just use the latest release in zip format. There are user reports that msvcp71.dll is needed to run this software. Due to license concerns it's not included in the distribution. However it should be fairly easy for you to locate it and place it to the WINDOWS directory. To Unix users: Install Python 2.6 and wxPython 2.8, grab the code and do a python DirCompare.pyOr use the #! trick. whatever you want :-) Comments are highly welcomed! DirCompare on Linux. Click for a larger image. [Less]
Created 12 months ago.

0 Users

a small file compare tool
Created 11 months ago.