mirror of
				https://github.com/launchbadge/sqlx.git
				synced 2025-11-04 07:22:53 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			314 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			314 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
create table comment (
 | 
						|
    comment_id uuid primary key default uuid_generate_v1mc(),
 | 
						|
    post_id uuid not null references post(post_id),
 | 
						|
    user_id uuid not null references "user"(user_id),
 | 
						|
    content text not null,
 | 
						|
    created_at timestamptz not null default now()
 | 
						|
);
 | 
						|
 | 
						|
create index on comment(created_at desc);
 |