You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
557 B
13 lines
557 B
SELECT if (
|
|
NOT EXISTS(
|
|
SELECT DISTINCT index_name FROM information_schema.statistics
|
|
WHERE table_schema = DATABASE()
|
|
AND table_name = 'devices'
|
|
AND column_name = 'encrypted_private_key'
|
|
)
|
|
,'ALTER TABLE devices ADD COLUMN encrypted_private_key TEXT NULL, ADD COLUMN encrypted_public_key TEXT NULL, ADD COLUMN encrypted_user_key TEXT NULL'
|
|
,'SELECT "info: column exist."'
|
|
) INTO @add_col_stmt;
|
|
PREPARE add_col_stmt FROM @add_col_stmt;
|
|
EXECUTE add_col_stmt;
|
|
DEALLOCATE PREPARE add_col_stmt;
|
|
|