Changes between Version 44 and Version 45 of DatabaseBackend
- Timestamp:
- Feb 28, 2015, 11:39:15 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DatabaseBackend
v44 v45 1 1 = Database Backend 2 2 3 Trac offers an easily extensible layer for Database support, see [source:trunk/trac/db/api.py trac.db.api]. The following backends have been integrated in this layer:3 Trac offers an easily extensible layer for database support, see [source:trunk/trac/db/api.py trac.db.api]. The following databases have been integrated in this layer: 4 4 * '''[http://www.sqlite.org SQLite]''', using '''PySqlite''', the default database 5 5 * '''[http://www.postgresql.org PostgreSQL]''', using the 6 6 '''[http://initd.org/pub/software/psycopg/ psycopg2]''' bindings, support added as of Trac [milestone:0.9].[[br]] 7 ''Note that ''psycopg1'' 8 is not supported anymore and that [http://pypgsql.sourceforge.net/ pyPgSQL] 9 also present issues for some users, see #5096).'' [[br]] 7 Note that psycopg1 is no longer supported and that [http://pypgsql.sourceforge.net/ pyPgSQL] also presents issues for some users, see #5096. [[br]] 10 8 Finally, see #126 for historical notes. 11 9 * '''[http://www.mysql.org MySQL]''', using MySqlDb, support added for Trac [milestone:0.10]; see [http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/342/focus=348 status report] and #986 for historical notes. 12 10 13 There 's work in progress for the following databases:11 There is work in progress for the following databases: 14 12 * [http://www.actian.com/products/operational-databases/ingres/ Ingres], see #6235. 15 13 * [http://www.oracle.com/index.html Oracle], see #1874. 16 14 * [http://www.microsoft.com/en-us/server-cloud/products/sql-server/ Microsoft SQL Server], see #329. 17 15 18 == Backend SpecificInstallation Instructions16 == Database Installation Instructions 19 17 20 18 === SQLite … … 29 27 * Have a working copy of Postgresql. 30 28 * Get the proper database driver for Python, see above. 31 * Create a database for your Trac environment .29 * Create a database for your Trac environment: 32 30 {{{ 33 31 % createdb dbname … … 38 36 }}} 39 37 40 Notice that the port number might be different in your Postgresql installation, eg 5433 , see postgresql.conf.38 Notice that the port number might be different in your Postgresql installation, eg 5433. See postgresql.conf. 41 39 42 40 Alternatively on UNIX, if the database is a local one, you can use UNIX sockets instead of TCP/IP: … … 52 50 See also #2441, which discusses the process of migration from SQLite to Postgresql. 53 51 54 For a postgresql recipe tested on CentOS4 (Red Hat -EL4) see [wiki:PostgresqlRecipe].52 For a Postgresql recipe tested on CentOS4 (Red Hat -EL4) see [wiki:PostgresqlRecipe]. 55 53 56 Note: Since Trac [milestone:0.10 0.10] the psycopg1 postgresql driver is no longer supported due to lack of Unicode support.54 Note: Since Trac [milestone:0.10 0.10] the psycopg1 Postgresql driver is no longer supported due to lack of Unicode support. 57 55 58 56 Known issues: see [query:keywords=~postgres&status=!closed postgres-related tickets] … … 89 87 90 88 An ORM could be used to provide a unified object interface to different RDBMS: 89 * [http://www.sqlalchemy.org/ SQLAlchemy] has its own plugin th:SqlAlchemyQueryMacro. 90 * [http://modeling.sourceforge.net/ Modeling], which is another, more advanced OR-Mapper. 91 * [http://adodb.sourceforge.net ADODB], the fast database abstraction layer with a version available for Python. 91 92 * some people have been talking about using [http://sqlobject.org SQLObject] to accomplish this goal of database independence. 92 * [http://modeling.sourceforge.net/ Modeling], which is another, more advanced OR-Mapper.93 * [http://www.sqlalchemy.org/ SQLAlchemy] is also quite advanced.94 95 Comparisons between both and more info on Python ORMs:96 * http://euc.cx/toulouse/archives/2003/04/21/evaluating_objectrelational_migration.html97 * http://google.com/search?q=SQLObject+modeling98 93 99 94 === Store Tickets and Wiki pages directly in the Subversion repository … … 101 96 A compelling idea with many advantages. A page advocating this plan is TighterSubversionIntegration. There has also been a discussion on the Trac mailing list, of which the arguments are summarized on the page [wiki:WhySQLite WhySQLite]. 102 97 103 === Other Alternatives104 105 * http://wiki.w4py.org/databaseintegration.html106 * http://adodb.sourceforge.net - the fast ADODB db abstraction layer (version available for python)