Posted by adrian on June 11, 2008 at 9:11pm
Jump to:
| Project: | Provision |
| Component: | Code |
| Category: | task |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | aegir-0.4 |
Issue Summary
Postgres support is very very far from high priority, but when we do have it, it would make more sense to maintain 1 provision_db_server module that extends drupal's existing db api. ie: provision.mysql.inc and provision.pgsql.inc.
even less of a higher priority is multiple web server (ie: apache/lightppd etc) support, but something similar could be useful if we wanted to implement multiple TYPES of apache hosting (ie: clusters, web front ends, etc).
Comments
#1
Make it clear that we want to abstract the database layer here.
#2
This can't be done until we're on D7 with the new db layer.
so this is a very very long time away.
#3
We now no longer rely on the drupal database layer at all, and drush 2.x now requires php 5.2, so we can rely on PDO always being available.
The only functions that need to differ for PG are :
<?phpfunction _provision_mysql_new_site_db($db_name, $db_user, $db_passwd, $db_host) {}
function _provision_mysql_destroy_site_db($db_name, $db_user, $db_passwd, $db_host) {}
function _provision_mysql_database_exists($name) {}
function _provision_mysql_create_database($name) {}
function _provision_mysql_grant($name, $username, $password, $host = '') {}
function _provision_mysql_revoke($name, $username, $host = '') {}
function _provision_mysql_import_dump($dump_file, $db_name, $db_user, $db_passwd, $db_host) {}
?>
At least for D6 sites, this should allow us to have full postgres support for drupal (in as far as the drupal postgres port actually works).
This would also give us access to sqlite, which might be useful for some interesting problems.
#4
Tagging for 0.4.
#5
This is a requirement of #585796: postgresql backend support.
#6
Main purpose of this post is to subscribe to get this into my issue queue.
I think a small provisionPDO class might be sufficient (not extending PDO itself). The constructor and destructor can handle a connection with other methods such as query, results, db_exists (?), create/drop_db, grant/revoke, and some others.
#7
we need to move them into drush engines, and conditionally include them based on a flag.
i'm open to making them classes too.
in fact, this might help a lot in our future work for server stuff.
#8
this is done in dev-services.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.