wise-coders / dbschema

DbSchema Database Designer
https://dbschema.com
72 stars 3 forks source link

Functions not imported when using "Generate Model from SQL File" #63

Closed ghost closed 2 years ago

ghost commented 2 years ago
  1. Please check DbSchema Help / Output logs for errors.
CREATE FUNCTION east_or_west (
    @long DECIMAL(9,6)
)
RETURNS CHAR(4) AS
BEGIN
    DECLARE @return_value CHAR(4);
    SET @return_value = 'same';
    IF (@long > 0.00) SET @return_value = 'east';
    IF (@long < 0.00) SET @return_value = 'west';

    RETURN @return_value
END;

-- GO

Parsed.
Done
  1. Please include the DbSchema version, operating system and used database

    • Ubuntu 20.04
    • DbSchema 8_5_2 Beta
  2. The steps to reproduce this issue

SQL file:

CREATE FUNCTION east_or_west (
    @long DECIMAL(9,6)
)
RETURNS CHAR(4) AS
BEGIN
    DECLARE @return_value CHAR(4);
    SET @return_value = 'same';
    IF (@long > 0.00) SET @return_value = 'east';
    IF (@long < 0.00) SET @return_value = 'west';

    RETURN @return_value
END;
wise-coders commented 2 years ago

This will be fixed in the next DbSchema release.