Files
adsPRO/migrations/001_google_ads_settings.sql
Jacek Pyziak afe9d6216d Add migrations for Google Ads settings and demo data
- Create migration for global settings table and add google_ads_customer_id and google_ads_start_date columns to clients table.
- Add migration to include product_url column in products_data table.
- Insert demo data for campaigns, products, and their history for client 'pomysloweprezenty.pl'.
- Implement client management interface with modals for adding and editing clients, including Google Ads Customer ID and data retrieval start date.
2026-02-15 17:46:32 +01:00

19 lines
871 B
SQL

-- Migracja: Tabela settings + kolumna google_ads_customer_id
-- Data: 2026-02-15
-- Opis: Dodaje globalną tabelę ustawień key-value oraz kolumnę Google Ads Customer ID do tabeli clients
-- 1. Tabela settings (globalne ustawienia aplikacji)
CREATE TABLE IF NOT EXISTS `settings` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`setting_key` VARCHAR(100) NOT NULL,
`setting_value` TEXT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_setting_key` (`setting_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2. Kolumna google_ads_customer_id w tabeli clients
ALTER TABLE `clients` ADD COLUMN `google_ads_customer_id` VARCHAR(20) NULL DEFAULT NULL AFTER `name`;
-- 3. Kolumna google_ads_start_date w tabeli clients (data od kiedy pobierać dane z Google Ads API)
ALTER TABLE `clients` ADD COLUMN `google_ads_start_date` DATE NULL DEFAULT NULL AFTER `google_ads_customer_id`;