32 lines
898 B
Plaintext
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
|