@ -11,6 +11,9 @@
 
			
		
	
		
		
			
				
					
					# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					ActiveRecord :: Schema [ 8 . 0 ] . define ( version :  2025_06_18_085322 )  do ActiveRecord :: Schema [ 8 . 0 ] . define ( version :  2025_06_18_085322 )  do  
			
		
	
		
		
			
				
					
					  # These are extensions that must be enabled in order to support this database 
 
			
		
	
		
		
			
				
					
					  enable_extension  " pg_catalog.plpgsql " 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  create_table  " access_tokens " ,  force :  :cascade  do  | t | 
  create_table  " access_tokens " ,  force :  :cascade  do  | t | 
 
			
		
	
		
		
			
				
					
					    t . integer  " user_id " ,  null :  false 
    t . integer  " user_id " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . text  " token " ,  null :  false 
    t . text  " token " ,  null :  false 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -156,7 +159,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_085322) do
 
			
		
	
		
		
			
				
					
					    t . string  " event_name " ,  null :  false 
    t . string  " event_name " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . datetime  " created_at " ,  null :  false 
    t . datetime  " created_at " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . datetime  " updated_at " ,  null :  false 
    t . datetime  " updated_at " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . index  [ " submitter_id " ,  " event_name " ] ,  name :  " index_document_generation_events_on_submitter_id_and_event_name " ,  unique :  true ,  where :  " event_name IN ('start', 'complete' )" 
    t . index  [ " submitter_id " ,  " event_name " ] ,  name :  " index_document_generation_events_on_submitter_id_and_event_name " ,  unique :  true ,  where :  " ((event_name)::text = ANY ((ARRAY['start'::character varying, 'complete'::character varying])::text[]) )" 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    t . index  [ " submitter_id " ] ,  name :  " index_document_generation_events_on_submitter_id " 
    t . index  [ " submitter_id " ] ,  name :  " index_document_generation_events_on_submitter_id " 
 
			
		
	
		
		
			
				
					
					  end 
  end 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -173,7 +176,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_085322) do
 
			
		
	
		
		
			
				
					
					    t . datetime  " created_at " ,  null :  false 
    t . datetime  " created_at " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " event_datetime " ] ,  name :  " index_email_events_on_account_id_and_event_datetime " 
    t . index  [ " account_id " ,  " event_datetime " ] ,  name :  " index_email_events_on_account_id_and_event_datetime " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " email " ] ,  name :  " index_email_events_on_email " 
    t . index  [ " email " ] ,  name :  " index_email_events_on_email " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " email " ] ,  name :  " index_email_events_on_email_event_types " ,  where :  " event_type IN ('bounce', 'soft_bounce', 'complaint', 'soft_complaint' )" 
    t . index  [ " email " ] ,  name :  " index_email_events_on_email_event_types " ,  where :  " ((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]) )" 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    t . index  [ " emailable_type " ,  " emailable_id " ] ,  name :  " index_email_events_on_emailable " 
    t . index  [ " emailable_type " ,  " emailable_id " ] ,  name :  " index_email_events_on_emailable " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " message_id " ] ,  name :  " index_email_events_on_message_id " 
    t . index  [ " message_id " ] ,  name :  " index_email_events_on_message_id " 
 
			
		
	
		
		
			
				
					
					  end 
  end 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -284,8 +287,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_085322) do
 
			
		
	
		
		
			
				
					
					    t . datetime  " expire_at " 
    t . datetime  " expire_at " 
 
			
		
	
		
		
			
				
					
					    t . text  " name " 
    t . text  " name " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_id " 
    t . index  [ " account_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_id " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " template_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_template_id_and_id " ,  where :  " " 
    t . index  [ " account_id " ,  " template_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_template_id_and_id " ,  where :  " ( archived_at IS NULL) " 
 
			
				
				
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " template_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_template_id_and_id_archived " ,  where :  " " 
    t . index  [ " account_id " ,  " template_id " ,  " id " ] ,  name :  " index_submissions_on_account_id_and_template_id_and_id_archived " ,  where :  " ( archived_at IS NOT NULL) " 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					    t . index  [ " created_by_user_id " ] ,  name :  " index_submissions_on_created_by_user_id " 
    t . index  [ " created_by_user_id " ] ,  name :  " index_submissions_on_created_by_user_id " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " slug " ] ,  name :  " index_submissions_on_slug " ,  unique :  true 
    t . index  [ " slug " ] ,  name :  " index_submissions_on_slug " ,  unique :  true 
 
			
		
	
		
		
			
				
					
					    t . index  [ " template_id " ] ,  name :  " index_submissions_on_template_id " 
    t . index  [ " template_id " ] ,  name :  " index_submissions_on_template_id " 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -365,8 +368,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_085322) do
 
			
		
	
		
		
			
				
					
					    t . string  " external_id " 
    t . string  " external_id " 
 
			
		
	
		
		
			
				
					
					    t . text  " preferences " ,  null :  false 
    t . text  " preferences " ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . boolean  " shared_link " ,  default :  false ,  null :  false 
    t . boolean  " shared_link " ,  default :  false ,  null :  false 
 
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " folder_id " ,  " id " ] ,  name :  " index_templates_on_account_id_and_folder_id_and_id " ,  where :  " " 
    t . index  [ " account_id " ,  " folder_id " ,  " id " ] ,  name :  " index_templates_on_account_id_and_folder_id_and_id " ,  where :  " ( archived_at IS NULL) " 
 
			
				
				
			
		
	
		
		
			
				
					
					    t . index  [ " account_id " ,  " id " ] ,  name :  " index_templates_on_account_id_and_id_archived " ,  where :  " " 
    t . index  [ " account_id " ,  " id " ] ,  name :  " index_templates_on_account_id_and_id_archived " ,  where :  " ( archived_at IS NOT NULL) " 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					    t . index  [ " account_id " ] ,  name :  " index_templates_on_account_id " 
    t . index  [ " account_id " ] ,  name :  " index_templates_on_account_id " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " author_id " ] ,  name :  " index_templates_on_author_id " 
    t . index  [ " author_id " ] ,  name :  " index_templates_on_author_id " 
 
			
		
	
		
		
			
				
					
					    t . index  [ " external_id " ] ,  name :  " index_templates_on_external_id " 
    t . index  [ " external_id " ] ,  name :  " index_templates_on_external_id "