Skip to content

Commit

Permalink
Merge pull request #3041 from erpcya/bugfix/#IsDocument-Flag-R1
Browse files Browse the repository at this point in the history
Add document Flag by default
Pull Request: #3041
  • Loading branch information
marcalwestf committed Mar 1, 2020
2 parents f7402f4 + e0902d9 commit 211bbc8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migration/393lts-394lts/05610_Fixed_document_flag_for_tables.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Migrations>
<Migration EntityType="ECA02" Name="Fixed document flag for tables" ReleaseNo="3.9.4" SeqNo="5610">
<Comments>See: https://github.com/adempiere/adempiere/pull/3041</Comments>
<Step DBType="ALL" Parse="Y" SeqNo="10" StepType="SQL">
<Comments>Update all tables</Comments>
<SQLStatement>UPDATE AD_Table SET IsDocument = 'N' WHERE IsView = 'Y';
UPDATE AD_Table SET IsDocument = 'Y' WHERE IsView = 'N' AND TableName NOT LIKE 'I_%' AND EXISTS(SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID = AD_Table.AD_Table_ID AND c.ColumnName IN('DocStatus', 'DocAction'));</SQLStatement>
</Step>
</Migration>
</Migrations>

0 comments on commit 211bbc8

Please sign in to comment.