Skip to content
Snippets Groups Projects
Commit 584c37b1 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Removed owner_id column from node table

parent 3fa71326
No related branches found
No related tags found
No related merge requests found
...@@ -63,9 +63,9 @@ public class NodeDAO { ...@@ -63,9 +63,9 @@ public class NodeDAO {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("INSERT INTO node"); sb.append("INSERT INTO node");
sb.append(" (name, busy_state, owner_id, creator_id, group_read, group_write,"); sb.append(" (name, busy_state, creator_id, group_read, group_write,");
sb.append(" is_public, parent_path, parent_relative_path, type, accept_views, provide_views)"); sb.append(" is_public, parent_path, parent_relative_path, type, accept_views, provide_views)");
sb.append(" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); sb.append(" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
jdbcTemplate.update(conn -> { jdbcTemplate.update(conn -> {
PreparedStatement ps = conn.prepareStatement(sb.toString()); PreparedStatement ps = conn.prepareStatement(sb.toString());
...@@ -73,7 +73,6 @@ public class NodeDAO { ...@@ -73,7 +73,6 @@ public class NodeDAO {
ps.setString(++i, NodeUtils.getNodeName(myNode)); ps.setString(++i, NodeUtils.getNodeName(myNode));
ps.setBoolean(++i, NodeUtils.getIsBusy(myNode)); ps.setBoolean(++i, NodeUtils.getIsBusy(myNode));
ps.setString(++i, NodeProperties.getStandardNodePropertyByName(myNode, "creator")); ps.setString(++i, NodeProperties.getStandardNodePropertyByName(myNode, "creator"));
ps.setString(++i, NodeProperties.getStandardNodePropertyByName(myNode, "creator"));
ps.setArray(++i, fromPropertyToArray(ps, NodeProperties.getStandardNodePropertyByName(myNode, "groupread"))); ps.setArray(++i, fromPropertyToArray(ps, NodeProperties.getStandardNodePropertyByName(myNode, "groupread")));
ps.setArray(++i, fromPropertyToArray(ps, NodeProperties.getStandardNodePropertyByName(myNode, "groupwrite"))); ps.setArray(++i, fromPropertyToArray(ps, NodeProperties.getStandardNodePropertyByName(myNode, "groupwrite")));
ps.setBoolean(++i, Boolean.valueOf(NodeProperties.getStandardNodePropertyByName(myNode, "publicread"))); ps.setBoolean(++i, Boolean.valueOf(NodeProperties.getStandardNodePropertyByName(myNode, "publicread")));
...@@ -240,7 +239,7 @@ public class NodeDAO { ...@@ -240,7 +239,7 @@ public class NodeDAO {
String insertSql = "INSERT INTO deleted_node " String insertSql = "INSERT INTO deleted_node "
+ "(node_id, parent_path, parent_relative_path, " + "(node_id, parent_path, parent_relative_path, "
+ "name, os_name, tstamp_wrapper_dir, type, location_id, format, " + "name, os_name, tstamp_wrapper_dir, type, location_id, format, "
+ "async_trans, busy_state, owner_id, creator_id, group_read, " + "async_trans, busy_state, creator_id, group_read, "
+ "group_write, is_public, delta, content_type, content_encoding, " + "group_write, is_public, delta, content_type, content_encoding, "
+ "content_length, content_md5, created_on, last_modified, " + "content_length, content_md5, created_on, last_modified, "
+ "accept_views, provide_views, protocols, sticky)\n"; + "accept_views, provide_views, protocols, sticky)\n";
...@@ -253,7 +252,7 @@ public class NodeDAO { ...@@ -253,7 +252,7 @@ public class NodeDAO {
+ "OR os.vos_path = ?) RETURNING\n" + "OR os.vos_path = ?) RETURNING\n"
+ "n.node_id, parent_path, parent_relative_path, " + "n.node_id, parent_path, parent_relative_path, "
+ "name, os_name, tstamp_wrapper_dir, type, location_id, format, " + "name, os_name, tstamp_wrapper_dir, type, location_id, format, "
+ "async_trans, busy_state, owner_id, creator_id, group_read, " + "async_trans, busy_state, creator_id, group_read, "
+ "group_write, is_public, delta, content_type, content_encoding, " + "group_write, is_public, delta, content_type, content_encoding, "
+ "content_length, content_md5, created_on, last_modified, " + "content_length, content_md5, created_on, last_modified, "
+ "accept_views, provide_views, protocols, sticky\n"; + "accept_views, provide_views, protocols, sticky\n";
......
DELETE FROM node; DELETE FROM node;
ALTER SEQUENCE node_node_id_seq RESTART WITH 1; ALTER SEQUENCE node_node_id_seq RESTART WITH 1;
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, location_id, is_public) VALUES (NULL, NULL, '', 'container', '0', '0', 1, true); INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, location_id, is_public) VALUES (NULL, NULL, '', 'container', '0', 1, true);
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, group_read, group_write, location_id) VALUES ('', NULL, 'test1', 'container', 'user1', 'user1', '{"group1","group2"}','{"group2"}', 1); -- /test1 INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, group_read, group_write, location_id) VALUES ('', NULL, 'test1', 'container', 'user1', '{"group1","group2"}','{"group2"}', 1); -- /test1
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, location_id) VALUES ('2', '', 'f1', 'container', 'user1', 'user1', 1); -- /test1/f1 (rel: /f1) INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, location_id) VALUES ('2', '', 'f1', 'container', 'user1', 1); -- /test1/f1 (rel: /f1)
INSERT INTO node (parent_path, parent_relative_path, name, os_name, type, owner_id, creator_id, location_id) VALUES ('2.3', '3', 'f2_renamed', 'f2', 'container', 'user1', 'user1', 1); -- /test1/f1/f2_renamed (rel: /f1/f2) INSERT INTO node (parent_path, parent_relative_path, name, os_name, type, creator_id, location_id) VALUES ('2.3', '3', 'f2_renamed', 'f2', 'container', 'user1', 1); -- /test1/f1/f2_renamed (rel: /f1/f2)
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, location_id) VALUES ('2.3.4', '3.4', 'f3', 'data', 'user1', 'user1', 1); -- /test1/f1/f2_renamed/f3 (rel: /f1/f2/f3) INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, location_id) VALUES ('2.3.4', '3.4', 'f3', 'data', 'user1', 1); -- /test1/f1/f2_renamed/f3 (rel: /f1/f2/f3)
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, is_public, location_id) VALUES ('', NULL, 'test2', 'container', 'user2', 'user2', true, 1); -- /test2 INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, is_public, location_id) VALUES ('', NULL, 'test2', 'container', 'user2', true, 1); -- /test2
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, is_public, location_id) VALUES ('6', '', 'f4', 'container', 'user2', 'user2', true, 1); -- /test2/f4 (rel: /f4) INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, is_public, location_id) VALUES ('6', '', 'f4', 'container', 'user2', true, 1); -- /test2/f4 (rel: /f4)
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, is_public, location_id) VALUES ('6', '', 'f5', 'container', 'user2', 'user2', true, 1); -- /test2/f5 (rel: /f5) INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, is_public, location_id) VALUES ('6', '', 'f5', 'container', 'user2', true, 1); -- /test2/f5 (rel: /f5)
DELETE FROM job; DELETE FROM job;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment