Skip to content
Snippets Groups Projects
Commit 612ce236 authored by quicksketch's avatar quicksketch Committed by Kevin Kaland
Browse files

Issue #1788626: Check if columns already exist.

parent 52572aa7
No related branches found
No related tags found
No related merge requests found
......@@ -110,15 +110,21 @@ function fillpdf_uninstall() {
* Add field to store destination path for saving PDFs as files.
*/
function fillpdf_update_7001() {
db_add_field('fillpdf_forms', 'destination_path', array('type' => 'varchar', 'length' => 255, 'not null' => FALSE));
if (!db_field_exists('fillpdf_forms', 'destination_path')) {
db_add_field('fillpdf_forms', 'destination_path', array('type' => 'varchar', 'length' => 255, 'not null' => FALSE));
}
}
/**
* Add fields to store token replacements.
*/
function fillpdf_update_7002() {
db_add_field('fillpdf_forms', 'replacements', array('type' => 'text', 'size' => 'normal', 'not null' => FALSE));
db_add_field('fillpdf_fields', 'replacements', array('type' => 'text', 'size' => 'normal', 'not null' => FALSE));
if (!db_field_exists('fillpdf_forms', 'replacements')) {
db_add_field('fillpdf_forms', 'replacements', array('type' => 'text', 'size' => 'normal', 'not null' => FALSE));
}
if (!db_field_exists('fillpdf_fields', 'replacements')) {
db_add_field('fillpdf_fields', 'replacements', array('type' => 'text', 'size' => 'normal', 'not null' => FALSE));
}
}
/**
......@@ -149,13 +155,16 @@ function fillpdf_update_7003() {
* Add field to store default NID.
*/
function fillpdf_update_7004() {
db_add_field('fillpdf_forms', 'default_nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE));
if (!db_field_exists('fillpdf_forms', 'default_nid')) {
db_add_field('fillpdf_forms', 'default_nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE));
}
}
/**
* Add database field to hold "Redirect to saved file" setting.
*/
function fillpdf_update_7005() {
db_add_field('fillpdf_forms', 'destination_redirect', array('type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'not null' => FALSE));
if (!db_field_exists('fillpdf_forms', 'destination_redirect')) {
db_add_field('fillpdf_forms', 'destination_redirect', array('type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'not null' => FALSE));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment