diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-08 08:40:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-08 08:40:10 +0000 |
commit | c54234d71a6f1a6857e74ffd1e76e5e0604833de (patch) | |
tree | 05bc03c2079a8760734982ef765677f8c9b9847f /database/database.pgsql | |
parent | 7b5a8d936cbc856020318928d50e73078ee4c679 (diff) | |
download | brdo-c54234d71a6f1a6857e74ffd1e76e5e0604833de.tar.gz brdo-c54234d71a6f1a6857e74ffd1e76e5e0604833de.tar.bz2 |
- Patch #40341 by Neil: fixed problems with database schema versions.
- When user #1 creates an account (we can assume this happens only once), system.module's schema version is set to the latest availiable.
- system_get_files_database() now includes a 'schema_version' child of each file object.
- That new information is re-saved when Drupal re-populates the system table.
- An array of newly-enabled modules is built, module_list() is reloaded, and the schema versions of each newly-enabled module are set to the most recent availiable. If the schema version is already set (presumably from a previous installation) it is not changed.
Diffstat (limited to 'database/database.pgsql')
-rw-r--r-- | database/database.pgsql | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/database/database.pgsql b/database/database.pgsql index 27e5997dd..fc992e2f9 100644 --- a/database/database.pgsql +++ b/database/database.pgsql @@ -650,7 +650,7 @@ CREATE TABLE system ( status integer NOT NULL default '0', throttle smallint NOT NULL default '0', bootstrap integer NOT NULL default '0', - schema_version smallint NOT NULL default 1, + schema_version smallint NOT NULL default 0, PRIMARY KEY (filename) ); @@ -814,22 +814,21 @@ CREATE TABLE watchdog ( -- Insert some default values -- -INSERT INTO system VALUES ('modules/block.module','block','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/comment.module','comment','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/filter.module','filter','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/help.module','help','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/menu.module','menu','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/node.module','node','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/page.module','page','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/story.module','story','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/system.module','system','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/taxonomy.module','taxonomy','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/user.module','user','module','',1,0,0,1); -INSERT INTO system VALUES ('modules/watchdog.module','watchdog','module','',1,0,0,1); -INSERT INTO system VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine','',1,0,0,1); -INSERT INTO system VALUES ('themes/bluemarine/page.tpl.php', 'bluemarine', 'theme', 'themes/engines/phptemplate/phptemplate.engine',1,0,0,1); - -INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2005-03-21";'); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/block.module', 'block', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/comment.module', 'comment', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/filter.module', 'filter', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/help.module', 'help', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/menu.module', 'menu', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/node.module', 'node', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/page.module', 'page', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/story.module', 'story', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/system.module', 'system', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/taxonomy.module', 'taxonomy', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/user.module', 'user', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/watchdog.module', 'watchdog', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/bluemarine/page.tpl.php', 'bluemarine', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, 0); + INSERT INTO variable(name,value) VALUES('theme_default','s:10:"bluemarine";'); INSERT INTO users(uid,name,mail) VALUES(0,'',''); INSERT INTO users_roles(uid,rid) VALUES(0, 1); |