SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 7.2.338 Pro] - Issues with schema compare

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 7.2.338 Pro] - Issues with schema compare
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 1390

Post [SA 7.2.338 Pro] - Issues with schema compare Reply with quote
I have issues with schema compare. I'm comparing an SQLite database to another one. The code the comparison creates for views is faulty. There's an example below:

Code:

CREATE VIEW [v_hely_tipusok] AS
SELECT
    pt.id_point_type  AS _id
   ,pt.[name]         AS [name]
   ,pt.[description]  AS [description]
   ,pt.icon_path      AS icon
FROM
    point_types   AS ptCREATE VIEW [v_hely_tipusok] AS
SELECT
    pt.id_point_type  AS _id
   ,pt.[name]         AS [name]
   ,pt.[description]  AS [description]
   ,pt.icon_path      AS icon
FROM
    point_types   AS pt

Thu Sep 24, 2015 12:47 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
Thank for reporting this. It looks like a bug in the schema compare template for views for SQLite. I'm going to submit this bug for further analysis, hope the required fix is trivial.
Thu Sep 24, 2015 5:27 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 1390

Post Reply with quote
The template looks fine but it seem that the contents of [DDL] column is added twice.
Fri Sep 25, 2015 3:36 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
Additional testings revealed that the issue is not in the schema compare template but somewhere else. Ticket #SA0027161 has been opened for this issue. I hope a fix will be provided in 7.3 release.
Sat Sep 26, 2015 1:48 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
the fix is actually very simple. In SQL Assistant Schema Compare options for SQLite please modify "Objects DDL" query as the following

Code:
SELECT
    'main' AS [Schema name],
    name AS [Object name],
    sql AS [DDL]
FROM sqlite_master
WHERE type = 'table'

Mon Sep 28, 2015 7:54 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 1390

Post Reply with quote
But wouldn't that remove comparison of views altogether?
Tue Sep 29, 2015 3:32 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
No, it won't. Another option (namely Use SQL Assistance Queries) in a different place in combination with this query makes the engine process view twice resulting in a duplicate DDL. This is SQLite specific handling. SQLite handling is quite different from other db servers, because it lacks regular database catalog tables.
Tue Sep 29, 2015 9:19 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.