Comments (5)
@kjvalencik thank you for create the issue. I'm start investigating what is the reason of this exception...
This will be fixed as soon as possible!
from schemaspy.
@rafalkasa Thanks for getting back so quickly. I put together a minimal repro script. Let me know if there is anything else I can provide.
SQL to generate a cross schema FK.
CREATE SCHEMA a
GO
CREATE SCHEMA b
GO
CREATE TABLE a.tbl_a (c int, PRIMARY KEY (c))
GO
CREATE TABLE b.tbl_b (c int, PRIMARY KEY (c), FOREIGN KEY (c) REFERENCES a.tbl_a(c))
GO
Full script to reproduce.
#!/bin/bash
set -euo pipefail
name="mssql-schemaspy"
password="Passw0rd"
function clean_up {
docker rm -f "$name" > /dev/null 2>&1 || true
}
trap clean_up EXIT
function start_sql {
docker run -d \
--name="$name" \
-e ACCEPT_EULA="Y" \
-e SA_PASSWORD="$password" \
microsoft/mssql-server-linux:latest \
> /dev/null
}
function exec_sql {
docker run -i --rm \
--net="container:${name}" \
--entrypoint="sqlcmd" \
tsgkadot/mssql-tools:latest \
-d "${1-test}" -S 127.0.0.1 -U sa -P "$password"
}
function wait_for_sql {
until is_ready > /dev/null; do
sleep 1
done
}
function is_ready {
exec_sql master << EOF
SELECT state
FROM master.sys.databases
GO
EOF
}
function create_db {
exec_sql master << EOF
CREATE DATABASE test
GO
EOF
}
function create_schemas {
exec_sql << EOF
CREATE SCHEMA a
GO
CREATE SCHEMA b
GO
EOF
}
function create_tables {
exec_sql << EOF
CREATE TABLE a.tbl_a (c int, PRIMARY KEY (c))
GO
CREATE TABLE b.tbl_b (c int, PRIMARY KEY (c), FOREIGN KEY (c) REFERENCES a.tbl_a(c))
GO
EOF
}
function schema_spy {
docker run --rm --net="container:${name}" -v $(pwd):/build \
schemaspy:latest \
-t mssql05 \
-dp /opt/schemaspy/lib/sqljdbc4.jar \
-db test \
-host localhost \
-port 1433 \
-all \
-u sa \
-p "$password" \
-o /build
}
start_sql
wait_for_sql
create_db
create_schemas
create_tables
schema_spy
from schemaspy.
@kjvalencik thank you very much for script that help reproduce the issue. This is more than appreciated.
from schemaspy.
@kjvalencik problem with Cross-Schema Foreign Keys was fixed and will be ready in version 6.0.0-rc1 to this moment in time you need to compile SchemeSpy yourself.
from schemaspy.
Confirmed fixed. Thanks! 👍
from schemaspy.
Related Issues (20)
- SchemaSpy automatically detects only Foreign Keys that reference a Primary Key HOT 7
- marcelstoer:chore/jar-noteAre there any objections to this PR marked as "important"? HOT 1
- Docker: arm image HOT 1
- Moving GUI components
- GUI does not respond to re-sizing HOT 1
- No relationships image created HOT 6
- Too much information in error.
- Sign snapshots
- Cant get line breaks in Table Comments to work. HOT 6
- I am unable to get comments
- Oracle database - null password given HOT 5
- Driver Error HOT 7
- Failed to parse [schema].meta.xml HOT 5
- Terminating null reference error when generating HTML for Constraints MSSQL HOT 1
- SchemaSpy ERD (relationship tab) is not showing lines between tables HOT 4
- Relationship between Unique Keys and Foreign Key HOT 8
- ERROR - Bad config Schema (-s/-schemas) was not provided and unable to deduce schema, ... HOT 2
- Trying to set trustServerCertificate true in schemaspy.connprops Property in config file does not work HOT 2
- Getting an Exception when running against Oracle database in charset ISO-8859-15 HOT 1
- Feature request: "Comment" as title in relationships.html
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schemaspy.