-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Plugin: Added SQL Server compability; Added FK and PK compability for MySQL and SQL Server #233
Conversation
sql server version
Sql server tweeks
sql server final tweek (sure right)
Added table count
String space
Count tables for normal sql
Removed empty spaces
Initial Foreign Key implementation
Added RowCell to scope
Added Models
Refactored TableModel usage
Created More models, refactor
Parse ForeignKey for MySQL and SQLSERVER
Separated Table Creation in UI from SQL Parse
Created Function to create Tables in UI
Added scalable tables that expand with the properties and table name
missing drawing the connector
Added SQL Server compability; Added FK and PK compability for MySQL and SQL Server
Reverted changes to index.html
Removed comment
Added more compability to SQL Server
@davidjgraph @christ66 @alderg Can i humbly ask for feedback about why my comment was deleted and when can this go to production? Thank you |
Thanks for the PR, this will be merged via our main repo and will appear in the next release. |
The plugin is available via Arrange, Insert, From SQL using this link. |
@brunomartinspro Did this functionality break? Your examples in the SO post do not create linkages between the tables as foreign keys. |
Unfortunately i never figured out how to visually link the foreign keys in 2018. Script generated from SSMS: USE [test]
GO
/****** Object: Table [dbo].[Rocket] Script Date: 20/08/2020 10:44:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Rocket](
[Id] [int] IDENTITY(1,1) NOT NULL,
[StatusId] [int] NOT NULL,
CONSTRAINT [PK_Rocket] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[RocketStatus] Script Date: 20/08/2020 10:44:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RocketStatus](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nchar](30) NOT NULL,
CONSTRAINT [PK_RocketStatus] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Rocket] WITH CHECK ADD CONSTRAINT [FK_Rocket_RocketStatus] FOREIGN KEY([StatusId])
REFERENCES [dbo].[RocketStatus] ([Id])
GO
ALTER TABLE [dbo].[Rocket] CHECK CONSTRAINT [FK_Rocket_RocketStatus]
GO
MySql example copied from Draw.IO: Foreign Key on SQL Plugin : |
The following functionalities are not working for me:
I have identified that the reason for the table name not populating is that there should be a space between the table name and the starting parenthesis. I don't know why the foreign key and primary key identification is not working. The result that I get if I use (taken from here ):
|
Same here, Example used there doesn't work for me either. |
@Eddie-Hartman @bolehlav Well something changed... now we have to add the plugin first before we can use it... |
@brunomartinspro I do not have to add it first. I can just go to:
Your version is still there if you add the plugin first, I had assumed that the two were based off of the same code though. |
Good news is that I have a pr with improved sql parsing and working foreign relationship lines. See the new pr #3091 |
No description provided.