Improve AD_Index; AD_View; foreign keys management

Description

  • Add 2 tabs to the Table and Column window: One for index definition and one for view definition

  • Index definition should be available for all tables except IsView=Y

  • View definition should only be available if IsView=Y

  • Create a process to create database index and view from the definition above

  • When it's a unique index, allow user to select an error message from AD_Message (The idea is we can perform unique validation in the future and able to show context sensitive error message)

Environment

None

Activity

Show:
Elaine Tan
September 27, 2013, 10:55 AM

"The child and parent table may be the same table, i.e. the foreign key refers back to the same table. Such a foreign key is known in SQL:2003 as a self-referencing or recursive foreign key." (Source: http://en.wikipedia.org/wiki/Foreign_key)

Carlos Ruiz
November 7, 2013, 11:32 PM

Test failed:

  • created a unique index and assigned a message for the index

When the uniqueness is broken the selected message is not shown.

Carlos Ruiz
November 7, 2013, 11:44 PM

Test failed:

  • the constraint creation must have "DEFERRABLE INITIALLY DEFERRED" at the end

I mean, when creating a constraint is executing this sql for example:

it must be

Heng Sin Low
November 8, 2013, 9:55 AM

1. DEFERRABLE INITIALLY DEFERRED clause, Fixed.
2. Error message for unique index work if the index name is the same as what's in the database. To avoid any typo issue, you can use the Create Table Index process to extract the name and index column from database.

Carlos Ruiz
November 8, 2013, 5:40 PM

Thanks Heng Sin.

It was caused because the spanish postgresql message uses a different quoting characters, like this:

I committed a fix

Assignee

Elaine Tan

Reporter

Elaine Tan

Labels

None

Tested By

None

Components

Fix versions

Priority

Major
Configure