Skip to content

Commit

Permalink
Merge pull request #689 from timopollmeier/tls-certificate-assets
Browse files Browse the repository at this point in the history
Ensure tls_certificates table exists in migrator
  • Loading branch information
mattmundell authored Aug 13, 2019
2 parents 2417e16 + c2065ce commit ee9a837
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/manage_migrators.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,24 @@ migrate_212_to_213 ()

/* Update the database. */

/* Ensure the table tls_certificates exists */
sql ("CREATE TABLE IF NOT EXISTS tls_certificates"
" (id SERIAL PRIMARY KEY,"
" uuid text UNIQUE NOT NULL,"
" owner integer REFERENCES users (id) ON DELETE RESTRICT,"
" name text,"
" comment text,"
" creation_time integer,"
" modification_time integer,"
" certificate text,"
" subject_dn text,"
" issuer_dn text,"
" activation_time integer,"
" expiration_time integer,"
" md5_fingerprint text,"
" trust integer,"
" certificate_format text);");

/* Add columns to tls_certificates */
sql ("ALTER TABLE tls_certificates"
" ADD COLUMN sha256_fingerprint text;");
Expand Down

0 comments on commit ee9a837

Please sign in to comment.