Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  - First time instances did not have the approval tables - Fixed issue with flat folder list for approval process
  • Loading branch information
thenitai committed Jul 18, 2016
2 parents 647d230 + 88d89a1 commit 7bb31bc
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 3 deletions.
25 changes: 25 additions & 0 deletions global/cfc/db_h2.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,31 @@
PRIMARY KEY (fs_id)
)
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.host_db_prefix#approval
(
approval_enabled boolean default '0',
approval_folders varchar(2000) default null,
approval_group_1 varchar(2000) default null,
approval_group_2 varchar(2000) default null,
approval_group_1_all boolean default '0',
approval_group_2_all boolean default '0',
host_id bigint default null,
approval_folders_all boolean default '0'
)
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.host_db_prefix#approval_done
(
user_id varchar(100) default null,
approval_date timestamp null default null,
file_id varchar(100) default null
)
</cfquery>


</cffunction>

<!--- Create Indexes --->
Expand Down
25 changes: 24 additions & 1 deletion global/cfc/db_mssql.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2532,11 +2532,34 @@
last_mail_notification_time datetime,
asset_keywords varchar(3) DEFAULT 'F',
asset_description varchar(3) DEFAULT 'F',
auto_entry varchar(5) DEFAULT 'false',
auto_entry varchar(5) DEFAULT 'false',
PRIMARY KEY (fs_id)
)
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.theschema#.#arguments.thestruct.host_db_prefix#approval
(
approval_enabled boolean default '0',
approval_folders varchar(2000) default null,
approval_group_1 varchar(2000) default null,
approval_group_2 varchar(2000) default null,
approval_group_1_all boolean default '0',
approval_group_2_all boolean default '0',
host_id int default null,
approval_folders_all boolean default '0'
)
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.theschema#.#arguments.thestruct.host_db_prefix#approval_done
(
user_id varchar(100) default null,
approval_date datetime null default null,
file_id varchar(100) default null
)
</cfquery>

</cffunction>

<!--- Create Indexes --->
Expand Down
34 changes: 32 additions & 2 deletions global/cfc/db_mysql.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2734,8 +2734,38 @@
asset_description varchar(3) DEFAULT 'F',
auto_entry varchar(5) DEFAULT 'false',
PRIMARY KEY (fs_id),
KEY folder_id (folder_id),
KEY user_id (user_id)
KEY #arguments.thestruct.host_db_prefix#fs_folder_id (folder_id),
KEY #arguments.thestruct.host_db_prefix#fs_user_id (user_id)
)
#this.tableoptions#
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.theschema#.#arguments.thestruct.host_db_prefix#approval
(
approval_enabled boolean default '0',
approval_folders varchar(2000) default null,
approval_group_1 varchar(2000) default null,
approval_group_2 varchar(2000) default null,
approval_group_1_all boolean default '0',
approval_group_2_all boolean default '0',
host_id int default null,
approval_folders_all boolean default '0',
key #arguments.thestruct.host_db_prefix#ap_approval_enabled (approval_enabled),
key #arguments.thestruct.host_db_prefix#ap_approval_group_1_all (approval_group_1_all),
key #arguments.thestruct.host_db_prefix#ap_approval_group_2_all (approval_group_2_all),
key #arguments.thestruct.host_db_prefix#ap_host_id (host_id),
key #arguments.thestruct.host_db_prefix#ap_approval_folders_all (approval_folders_all)
)
#this.tableoptions#
</cfquery>

<cfquery datasource="#arguments.thestruct.dsn#">
CREATE TABLE #arguments.thestruct.theschema#.#arguments.thestruct.host_db_prefix#approval_done
(
user_id varchar(100) default null,
approval_date timestamp null default null,
file_id varchar(100) default null
)
#this.tableoptions#
</cfquery>
Expand Down
1 change: 1 addition & 0 deletions global/cfc/folders.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -8662,6 +8662,7 @@
<!--- Pass query to recursive function to get child folders --->
<cfinvoke method="recfoldername" returnvariable="_qry">
<cfinvokeargument name="theqry" value="#qry#">
<cfinvokeargument name="theoverallqry" value="#qry#">
</cfinvoke>
<!--- Sort query --->
<cfset QuerySort( _qry, 'folder_path', 'textnocase' )>
Expand Down

0 comments on commit 7bb31bc

Please sign in to comment.