Files
relspecgo/examples/test_schema_modified.dbml
Hein fcbceaf434
Some checks are pending
CI / Test (1.25) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build (push) Waiting to run
CI / Test (1.23) (push) Waiting to run
CI / Test (1.24) (push) Waiting to run
Added diff to the tool
2025-12-18 13:38:32 +02:00

32 lines
898 B
Plaintext

// 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