summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/database.mysql18
-rw-r--r--database/updates.inc19
2 files changed, 35 insertions, 2 deletions
diff --git a/database/database.mysql b/database/database.mysql
index 003fb35d2..30591c8ef 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -339,7 +339,21 @@ CREATE TABLE node (
KEY node_changed (changed)
) TYPE=MyISAM;
---
+#
+# Table structure for table `node_access`
+#
+
+CREATE TABLE node_access (
+ nid int(10) unsigned NOT NULL default '0',
+ gid int(10) unsigned NOT NULL default '0',
+ realm varchar(255) NOT NULL default '',
+ grant_view tinyint(1) unsigned NOT NULL default '0',
+ grant_update tinyint(1) unsigned NOT NULL default '0',
+ grant_delete tinyint(1) unsigned NOT NULL default '0',
+ PRIMARY KEY (nid,gid,realm)
+) TYPE=MyISAM;
+
+-
-- Table structure for table 'page'
--
@@ -682,3 +696,5 @@ REPLACE blocks SET module = 'user', delta = '0', status = '1';
REPLACE blocks SET module = 'user', delta = '1', status = '1';
INSERT INTO sequences (name, id) VALUES ('menu_mid', 1);
+
+INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
diff --git a/database/updates.inc b/database/updates.inc
index ef1d86968..501f7cd15 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -65,7 +65,8 @@ $sql_updates = array(
"2004-06-30" => "update_91",
"2004-07-07" => "update_92",
"2004-07-11" => "update_93",
- "2004-07-22" => "update_94"
+ "2004-07-22" => "update_94",
+ "2004-07-30" => "update_95"
);
function update_32() {
@@ -1187,6 +1188,22 @@ function update_94() {
return $ret;
}
+function update_95() {
+ $ret = array();
+
+ $ret[] = update_sql("CREATE TABLE node_access (
+ nid int(10) unsigned NOT NULL default '0',
+ gid int(10) unsigned NOT NULL default '0',
+ realm varchar(255) NOT NULL default '',
+ grant_view tinyint(1) unsigned NOT NULL default '0',
+ grant_update tinyint(1) unsigned NOT NULL default '0',
+ grant_delete tinyint(1) unsigned NOT NULL default '0',
+ PRIMARY KEY (nid,gid,realm)
+ )");
+ $ret[] = update_sql("INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);");
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);