NF_Database_Migrations_Relationships

The Ninja Forms NF Database Migrations Relationships class.

Defined (1)

The class is defined in the following location(s).

/includes/Database/Migrations/Relationships.php  
  1. class NF_Database_Migrations_Relationships extends NF_Abstracts_Migration 
  2. public function __construct() 
  3. parent::__construct( 
  4. 'nf3_relationships',  
  5. 'nf_migration_create_table_relationships' 
  6. ); 
  7.  
  8. public function run() 
  9. $query = "CREATE TABLE IF NOT EXISTS $this->table_name ( 
  10. `id` int NOT NULL AUTO_INCREMENT,  
  11. `child_id` int NOT NULL,  
  12. `child_type` longtext NOT NULL,  
  13. `parent_id` int NOT NULL,  
  14. `parent_type` longtext NOT NULL,  
  15. `created_at` TIMESTAMP,  
  16. `updated_at` DATETIME,  
  17. UNIQUE KEY (`id`) 
  18. ) $this->charset_collate;"; 
  19.  
  20. dbDelta( $query ); 
  21.