From c86d95af6091915f94a54ef1b1568bfd82431738 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 13 Aug 2020 16:43:07 +0100 Subject: [PATCH] Created an "lotw_certs" table to hold p12 cert data for lotw sync --- application/config/migration.php | 2 +- .../migrations/041_add_lotw_certs_table.php | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 application/migrations/041_add_lotw_certs_table.php diff --git a/application/config/migration.php b/application/config/migration.php index 31de43d6..37cfddba 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 40; +$config['migration_version'] = 41; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/041_add_lotw_certs_table.php b/application/migrations/041_add_lotw_certs_table.php new file mode 100644 index 00000000..e1717a6f --- /dev/null +++ b/application/migrations/041_add_lotw_certs_table.php @@ -0,0 +1,46 @@ +dbforge->add_field(array( + 'lotw_cert_id' => array( + 'type' => 'INT', + 'constraint' => 1, + 'unsigned' => TRUE, + 'auto_increment' => TRUE + ), + + 'callsign' => array( + 'type' => 'VARCHAR', + 'constraint' => '100', + ), + + 'cert_dxcc' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + ), + + 'date_created' => array( + 'type' => 'DATETIME', + 'null' => TRUE, + ), + + 'date_expires' => array( + 'type' => 'DATETIME', + 'null' => TRUE, + ), + )); + + $this->dbforge->add_key('lotw_cert_id', TRUE); + $this->dbforge->create_table('lotw_certs'); + } + + public function down() + { + $this->dbforge->drop_table('lotw_certs'); + } +} \ No newline at end of file