Added diff to the tool
This commit is contained in:
31
examples/test_schema_modified.dbml
Normal file
31
examples/test_schema_modified.dbml
Normal file
@@ -0,0 +1,31 @@
|
||||
// Modified test schema for diff testing
|
||||
Table public.users {
|
||||
id bigint [pk, increment]
|
||||
email varchar(255) [unique, not null]
|
||||
name varchar(150) // Changed from 100 to 150
|
||||
phone varchar(20) // New column
|
||||
created_at timestamp [not null]
|
||||
updated_at timestamp
|
||||
}
|
||||
|
||||
Table public.posts {
|
||||
id bigint [pk, increment]
|
||||
user_id bigint [not null]
|
||||
title varchar(200) [not null]
|
||||
content text
|
||||
published boolean [default: true] // Changed default from false to true
|
||||
views integer [default: 0] // New column
|
||||
created_at timestamp [not null]
|
||||
}
|
||||
|
||||
Table public.comments {
|
||||
id bigint [pk, increment]
|
||||
post_id bigint [not null]
|
||||
user_id bigint [not null]
|
||||
content text [not null]
|
||||
created_at timestamp [not null]
|
||||
}
|
||||
|
||||
Ref: public.posts.user_id > public.users.id [ondelete: CASCADE]
|
||||
Ref: public.comments.post_id > public.posts.id [ondelete: CASCADE]
|
||||
Ref: public.comments.user_id > public.users.id
|
||||
Reference in New Issue
Block a user