Browse Source

new column 'grp' added to attr_types table

Karel Kozlik 19 years ago
parent
commit
1d2cb9e024

+ 20 - 1
db/schema/attr_types.xml

@@ -9,7 +9,7 @@
 
 <table role="serweb">
     <name>attr_types</name>
-    <version>3</version>
+    <version>4</version>
     <description>
 	Each attribute, identified by name, has associated set of
 	properties and constraints. This table contains types and
@@ -122,6 +122,16 @@
 	</description>
     </column>
 	
+	<column role="serweb" id="at.grp">
+	<name>grp</name>
+	<type>string</type>
+	<size>32</size>
+	<default>other</default>
+	<description>
+		When attributes are displayed in serweb, they could be grouped together by this field. 
+		This is used by SERWeb only.
+	</description>
+    </column>
 
     <index>
 	<name>upt_idx1</name>
@@ -228,6 +238,7 @@
 		<value col="at.flags">2048</value>
 		<value col="at.prior">256</value>
 		<value col="at.order">10</value>
+		<value col="at.grp">general</value>
 	</row>
 
 	<row vendor-controlled="1">
@@ -239,6 +250,7 @@
 		<value col="at.flags">2048</value>
 		<value col="at.prior">256</value>
 		<value col="at.order">20</value>
+		<value col="at.grp">general</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -250,6 +262,7 @@
 		<value col="at.flags">6144</value>
 		<value col="at.prior">256</value>
 		<value col="at.order">30</value>
+		<value col="at.grp">general</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -261,6 +274,7 @@
 		<value col="at.flags">2048</value>
 		<value col="at.prior">1073807616</value>
 		<value col="at.order">60</value>
+		<value col="at.grp">general</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -272,6 +286,7 @@
 		<value col="at.flags">0</value>
 		<value col="at.prior">256</value>
 		<value col="at.order">110</value>
+		<value col="at.grp">privacy</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -283,6 +298,7 @@
 		<value col="at.flags">0</value>
 		<value col="at.prior">1073807616</value>
 		<value col="at.order">50</value>
+		<value col="at.grp">general</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -294,6 +310,7 @@
 		<value col="at.flags">0</value>
 		<value col="at.prior">1073742080</value>
 		<value col="at.order">100</value>
+		<value col="at.grp">privacy</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -345,6 +362,7 @@
 		<value col="at.flags">2048</value>
 		<value col="at.prior">256</value>
 		<value col="at.order">40</value>
+		<value col="at.grp">general</value>
 	</row>
 	
 	<row vendor-controlled="1">
@@ -472,6 +490,7 @@
 		<value col="at.flags">4096</value>
 		<value col="at.prior">1073807360</value>
 		<value col="at.order">0</value>
+		<value col="at.grp">general</value>
 	</row>
 
 								      

+ 34 - 34
scripts/dbtext/ser_db/attr_types

@@ -1,34 +1,34 @@
-name(str) rich_type(str) raw_type(int) type_spec(str,null) description(str,null) default_flags(int) flags(int) priority(int) access(int) ordering(int) 
-uid:string:2:::1:0:0:0:0
-did:string:2:::1:0:0:0:0
-datetime_created:string:2::creation time:33:0:0:1:0
-asserted_id:string:2::asserted identity:33:0:256:1:200
-fr_timer:int:0::@ff_fr_timer:33:0:1073807616:0:140
-fr_inv_timer:int:0::@ff_fr_inv_timer:33:0:1073807616:0:150
-gflags:int:0::global flags:33:0:1073741824:0:0
-digest_realm:string:2::digest realm:33:4096:65536:0:0
-acl:string:2::access control list of user:33:1024:0:0:0
-first_name:string:2::@ff_first_name:32:2048:256:0:10
-last_name:string:2::@ff_last_name:32:2048:256:0:20
-email:email_adr:2::@ff_email:33:6144:256:0:30
-timezone:timezone:2::@ff_timezone:32:2048:1073807616:0:60
-sw_allow_find:boolean:0::@ff_allow_lookup_for_me:32:0:256:0:110
-lang:lang:2::@ff_language:33:0:1073807616:0:50
-sw_show_status:boolean:0::@ff_status_visibility:32:0:1073742080:0:100
-sw_admin:string:2::admin of domain:32:1024:0:0:0
-sw_owner:string:2::owner of domain:32:0:0:0:0
-sw_domain_default_flags:int:0::@ff_domain_def_f:32:4096:1073741824:0:0
-sw_deleted_ts:int:0::deleted timestamp:32:0:0:0:0
-phone:string:2::@ff_phone:32:2048:256:0:40
-sw_acl_control:string:2::acl control:32:1024:0:0:0
-sw_credential_default_flags:int:0::@ff_credential_def_f:32:4096:1073741824:0:0
-sw_uri_default_flags:int:0::@ff_uri_def_f:32:4096:1073741824:0:0
-sw_is_admin:boolean:0::admin privilege:32:0:0:0:0
-sw_is_hostmaster:boolean:0::hostmaster privilege:32:0:0:0:0
-sw_confirmation:string:2::registration confirmation:32:0:0:0:0
-sw_pending_ts:string:2::registration timestamp:32:0:0:0:0
-sw_require_confirm:boolean:0::@ff_reg_confirmation:32:0:1073807360:0:120
-sw_send_missed:boolean:0::@ff_send_daily_missed_calls:32:0:1073807616:0:130
-uid_format:list:2:a\:3\:{i\:0;s\:14\:"username@realm";i\:1;s\:21\:"integer (incremental)";i\:2;s\:15\:"UUID by RFC4122";}:@ff_uid_format:32:0:1073741824:0:160
-did_format:list:2:a\:3\:{i\:0;s\:11\:"domain name";i\:1;s\:21\:"integer (incremental)";i\:2;s\:15\:"UUID by RFC4122";}:@ff_did_format:32:0:1073741824:0:170
-contact_email:email_adr:2::@ff_contact_email:32:4096:1073807360:0:0
+name(str) rich_type(str) raw_type(int) type_spec(str,null) description(str,null) default_flags(int) flags(int) priority(int) access(int) ordering(int) grp(str) 
+uid:string:2:::1:0:0:0:0:other
+did:string:2:::1:0:0:0:0:other
+datetime_created:string:2::creation time:33:0:0:1:0:other
+asserted_id:string:2::asserted identity:33:0:256:1:200:other
+fr_timer:int:0::@ff_fr_timer:33:0:1073807616:0:140:other
+fr_inv_timer:int:0::@ff_fr_inv_timer:33:0:1073807616:0:150:other
+gflags:int:0::global flags:33:0:1073741824:0:0:other
+digest_realm:string:2::digest realm:33:4096:65536:0:0:other
+acl:string:2::access control list of user:33:1024:0:0:0:other
+first_name:string:2::@ff_first_name:32:2048:256:0:10:general
+last_name:string:2::@ff_last_name:32:2048:256:0:20:general
+email:email_adr:2::@ff_email:33:6144:256:0:30:general
+timezone:timezone:2::@ff_timezone:32:2048:1073807616:0:60:general
+sw_allow_find:boolean:0::@ff_allow_lookup_for_me:32:0:256:0:110:privacy
+lang:lang:2::@ff_language:33:0:1073807616:0:50:general
+sw_show_status:boolean:0::@ff_status_visibility:32:0:1073742080:0:100:privacy
+sw_admin:string:2::admin of domain:32:1024:0:0:0:other
+sw_owner:string:2::owner of domain:32:0:0:0:0:other
+sw_domain_default_flags:int:0::@ff_domain_def_f:32:4096:1073741824:0:0:other
+sw_deleted_ts:int:0::deleted timestamp:32:0:0:0:0:other
+phone:string:2::@ff_phone:32:2048:256:0:40:general
+sw_acl_control:string:2::acl control:32:1024:0:0:0:other
+sw_credential_default_flags:int:0::@ff_credential_def_f:32:4096:1073741824:0:0:other
+sw_uri_default_flags:int:0::@ff_uri_def_f:32:4096:1073741824:0:0:other
+sw_is_admin:boolean:0::admin privilege:32:0:0:0:0:other
+sw_is_hostmaster:boolean:0::hostmaster privilege:32:0:0:0:0:other
+sw_confirmation:string:2::registration confirmation:32:0:0:0:0:other
+sw_pending_ts:string:2::registration timestamp:32:0:0:0:0:other
+sw_require_confirm:boolean:0::@ff_reg_confirmation:32:0:1073807360:0:120:other
+sw_send_missed:boolean:0::@ff_send_daily_missed_calls:32:0:1073807616:0:130:other
+uid_format:list:2:a\:3\:{i\:0;s\:14\:"username@realm";i\:1;s\:21\:"integer (incremental)";i\:2;s\:15\:"UUID by RFC4122";}:@ff_uid_format:32:0:1073741824:0:160:other
+did_format:list:2:a\:3\:{i\:0;s\:11\:"domain name";i\:1;s\:21\:"integer (incremental)";i\:2;s\:15\:"UUID by RFC4122";}:@ff_did_format:32:0:1073741824:0:170:other
+contact_email:email_adr:2::@ff_contact_email:32:4096:1073807360:0:0:general

+ 2 - 1
scripts/mysql/my_create.sql

@@ -79,7 +79,7 @@ CREATE TABLE credentials (
     KEY uid (uid)
 );
 
-INSERT INTO version (table_name, table_version) values ('attr_types','3');
+INSERT INTO version (table_name, table_version) values ('attr_types','4');
 CREATE TABLE attr_types (
     name VARCHAR(32) NOT NULL,
     rich_type VARCHAR(32) NOT NULL DEFAULT 'string',
@@ -91,6 +91,7 @@ CREATE TABLE attr_types (
     priority INT NOT NULL DEFAULT '0',
     access INT NOT NULL DEFAULT '0',
     ordering INT NOT NULL DEFAULT '0',
+    grp VARCHAR(32) NOT NULL DEFAULT 'other',
     UNIQUE KEY upt_idx1 (name)
 );
 

+ 9 - 9
scripts/mysql/my_data.sql

@@ -17,19 +17,19 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='acl';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('acl', '2', 'string', 'access control list of user', '33', '1024', '0', '0');
 DELETE FROM attr_types WHERE name='first_name';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10', 'general');
 DELETE FROM attr_types WHERE name='last_name';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20', 'general');
 DELETE FROM attr_types WHERE name='email';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30', 'general');
 DELETE FROM attr_types WHERE name='timezone';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60', 'general');
 DELETE FROM attr_types WHERE name='sw_allow_find';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110', 'privacy');
 DELETE FROM attr_types WHERE name='lang';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50', 'general');
 DELETE FROM attr_types WHERE name='sw_show_status';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100', 'privacy');
 DELETE FROM attr_types WHERE name='sw_admin';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_admin', '2', 'string', 'admin of domain', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_owner';
@@ -39,7 +39,7 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='sw_deleted_ts';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_deleted_ts', '0', 'int', 'deleted timestamp', '32', '0', '0');
 DELETE FROM attr_types WHERE name='phone';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40', 'general');
 DELETE FROM attr_types WHERE name='sw_acl_control';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_acl_control', '2', 'string', 'acl control', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_credential_default_flags';
@@ -63,7 +63,7 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='did_format';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, type_spec) VALUES ('did_format', '2', 'list', '@ff_did_format', '32', '0', '1073741824', '170', 'a:3:{i:0;s:11:"domain name";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}');
 DELETE FROM attr_types WHERE name='contact_email';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0', 'general');
 
 DELETE FROM global_attrs WHERE name='sw_domain_default_flags';
 INSERT IGNORE INTO global_attrs (name, type, value, flags) VALUES ('sw_domain_default_flags', '0', '33', '32');

+ 2 - 1
scripts/oracle/or_create.sql

@@ -79,7 +79,7 @@ CREATE TABLE credentials (
     KEY uuid (uuid)
 );
 
-INSERT INTO version (table_name, table_version) values ('attr_types','3');
+INSERT INTO version (table_name, table_version) values ('attr_types','4');
 CREATE TABLE attr_types (
     name VARCHAR(32) NOT NULL,
     rich_type VARCHAR(32) NOT NULL DEFAULT 'string',
@@ -91,6 +91,7 @@ CREATE TABLE attr_types (
     priority INT NOT NULL DEFAULT '0',
     attr_access INT NOT NULL DEFAULT '0',
     ordering INT NOT NULL DEFAULT '0',
+    grp VARCHAR(32) NOT NULL DEFAULT 'other',
     UNIQUE KEY upt_idx1 (name)
 );
 

+ 9 - 9
scripts/oracle/or_data.sql

@@ -17,19 +17,19 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='acl';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('acl', '2', 'string', 'access control list of user', '33', '1024', '0', '0');
 DELETE FROM attr_types WHERE name='first_name';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10', 'general');
 DELETE FROM attr_types WHERE name='last_name';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20', 'general');
 DELETE FROM attr_types WHERE name='email';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30', 'general');
 DELETE FROM attr_types WHERE name='timezone';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60', 'general');
 DELETE FROM attr_types WHERE name='sw_allow_find';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110', 'privacy');
 DELETE FROM attr_types WHERE name='lang';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50', 'general');
 DELETE FROM attr_types WHERE name='sw_show_status';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100', 'privacy');
 DELETE FROM attr_types WHERE name='sw_admin';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_admin', '2', 'string', 'admin of domain', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_owner';
@@ -39,7 +39,7 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='sw_deleted_ts';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_deleted_ts', '0', 'int', 'deleted timestamp', '32', '0', '0');
 DELETE FROM attr_types WHERE name='phone';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40', 'general');
 DELETE FROM attr_types WHERE name='sw_acl_control';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_acl_control', '2', 'string', 'acl control', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_credential_default_flags';
@@ -63,7 +63,7 @@ INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_f
 DELETE FROM attr_types WHERE name='did_format';
 INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, type_spec) VALUES ('did_format', '2', 'list', '@ff_did_format', '32', '0', '1073741824', '170', 'a:3:{i:0;s:11:"domain name";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}');
 DELETE FROM attr_types WHERE name='contact_email';
-INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0');
+INSERT IGNORE INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0', 'general');
 
 DELETE FROM global_attrs WHERE name='sw_domain_default_flags';
 INSERT IGNORE INTO global_attrs (name, type, value, flags) VALUES ('sw_domain_default_flags', '0', '33', '32');

+ 1 - 0
scripts/postgres/pg_create.sql

@@ -91,6 +91,7 @@ CREATE TABLE attr_types (
     priority INTEGER NOT NULL DEFAULT '0',
     access INTEGER NOT NULL DEFAULT '0',
     ordering INTEGER NOT NULL DEFAULT '0',
+    grp VARCHAR(32) NOT NULL DEFAULT 'other',
     CONSTRAINT upt_idx1 UNIQUE (name)
 );
 

+ 9 - 9
scripts/postgres/pg_data.sql

@@ -17,19 +17,19 @@ INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, f
 DELETE FROM attr_types WHERE name='acl';
 INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('acl', '2', 'string', 'access control list of user', '33', '1024', '0', '0');
 DELETE FROM attr_types WHERE name='first_name';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('first_name', '2', 'string', '@ff_first_name', '32', '2048', '256', '10', 'general');
 DELETE FROM attr_types WHERE name='last_name';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('last_name', '2', 'string', '@ff_last_name', '32', '2048', '256', '20', 'general');
 DELETE FROM attr_types WHERE name='email';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('email', '2', 'email_adr', '@ff_email', '33', '6144', '256', '30', 'general');
 DELETE FROM attr_types WHERE name='timezone';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('timezone', '2', 'timezone', '@ff_timezone', '32', '2048', '1073807616', '60', 'general');
 DELETE FROM attr_types WHERE name='sw_allow_find';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_allow_find', '0', 'boolean', '@ff_allow_lookup_for_me', '32', '0', '256', '110', 'privacy');
 DELETE FROM attr_types WHERE name='lang';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('lang', '2', 'lang', '@ff_language', '33', '0', '1073807616', '50', 'general');
 DELETE FROM attr_types WHERE name='sw_show_status';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('sw_show_status', '0', 'boolean', '@ff_status_visibility', '32', '0', '1073742080', '100', 'privacy');
 DELETE FROM attr_types WHERE name='sw_admin';
 INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_admin', '2', 'string', 'admin of domain', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_owner';
@@ -39,7 +39,7 @@ INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, f
 DELETE FROM attr_types WHERE name='sw_deleted_ts';
 INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_deleted_ts', '0', 'int', 'deleted timestamp', '32', '0', '0');
 DELETE FROM attr_types WHERE name='phone';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('phone', '2', 'string', '@ff_phone', '32', '2048', '256', '40', 'general');
 DELETE FROM attr_types WHERE name='sw_acl_control';
 INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority) VALUES ('sw_acl_control', '2', 'string', 'acl control', '32', '1024', '0');
 DELETE FROM attr_types WHERE name='sw_credential_default_flags';
@@ -63,7 +63,7 @@ INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, f
 DELETE FROM attr_types WHERE name='did_format';
 INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, type_spec) VALUES ('did_format', '2', 'list', '@ff_did_format', '32', '0', '1073741824', '170', 'a:3:{i:0;s:11:"domain name";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}');
 DELETE FROM attr_types WHERE name='contact_email';
-INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0');
+INSERT INTO attr_types (name, raw_type, rich_type, description, default_flags, flags, priority, ordering, grp) VALUES ('contact_email', '2', 'email_adr', '@ff_contact_email', '32', '4096', '1073807360', '0', 'general');
 
 DELETE FROM global_attrs WHERE name='sw_domain_default_flags';
 INSERT INTO global_attrs (name, type, value, flags) VALUES ('sw_domain_default_flags', '0', '33', '32');