/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;

USE `run_sumber_boga_modul`;

/* Alter table in target */
ALTER TABLE `acc_coa` 
	CHANGE `rekening` `rekening` varchar(64)  COLLATE utf8mb3_unicode_ci NULL first , 
	CHANGE `head_code` `head_code` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `rekening` , 
	CHANGE `p_head_code` `p_head_code` varchar(11)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `head_code` , 
	CHANGE `head_name` `head_name` varchar(100)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `p_head_code` , 
	CHANGE `p_head_name` `p_head_name` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `is_rekening_pembantu` , 
	CHANGE `head_type` `head_type` char(1)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `head_level` , 
	CHANGE `extern_jenis` `extern_jenis` varchar(255)  COLLATE utf8mb3_unicode_ci NULL COMMENT 'jenis sumber(produk,customer,vendor, dll)' after `head_type` , 
	CHANGE `create_by` `create_by` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `depreciation_rate` , 
	CHANGE `update_by` `update_by` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `create_date` , 
	CHANGE `toko_id` `toko_id` varchar(255)  COLLATE utf8mb3_unicode_ci NULL DEFAULT '0' after `is_lain_lain_kre` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_unicode_ci' ;

/* Alter table in target */
ALTER TABLE `briva_inquiry` 
	CHANGE `json` `json` longtext  COLLATE utf8mb3_general_ci NULL after `status` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `calc_stok_limit` 
	CHANGE `nama` `nama` varchar(64)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `label` `label` varchar(128)  COLLATE utf8mb3_general_ci NULL after `nama` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `dashboard_opname` 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `done_nama` `done_nama` varchar(32)  COLLATE utf8mb3_general_ci NULL after `done_id` , 
	CHANGE `session_opname` `session_opname` varchar(32)  COLLATE utf8mb3_general_ci NULL after `status` , 
	CHANGE `jenis` `jenis` varchar(32)  COLLATE utf8mb3_general_ci NULL after `session_opname` , 
	CHANGE `acc_nama_1` `acc_nama_1` varchar(32)  COLLATE utf8mb3_general_ci NULL after `acc_id_1` , 
	CHANGE `acc_nama_2` `acc_nama_2` varchar(32)  COLLATE utf8mb3_general_ci NULL after `acc_id_2` , 
	CHANGE `confirm_nama` `confirm_nama` varchar(32)  COLLATE utf8mb3_general_ci NULL after `confirm_id` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `dashboard_opname_data` 
	CHANGE `jenis` `jenis` varchar(32)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `produk_nama` `produk_nama` varchar(64)  COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' after `produk_id` , 
	CHANGE `session_opname` `session_opname` varchar(32)  COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' after `gudang_id` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `log_cek_validate` 
	CHANGE `isi` `isi` longtext  COLLATE utf8mb3_general_ci NULL after `fulldate` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `log_transaksi_point_duplicate` 
	CHANGE `machine_id` `machine_id` varchar(100)  COLLATE utf8mb3_general_ci NULL after `x_id` , 
	CHANGE `nomer` `nomer` varchar(100)  COLLATE utf8mb3_general_ci NULL after `machine_id` , 
	CHANGE `nomer2` `nomer2` varchar(100)  COLLATE utf8mb3_general_ci NULL after `nomer` , 
	CHANGE `jenis` `jenis` varchar(100)  COLLATE utf8mb3_general_ci NULL after `nomer2` , 
	CHANGE `customers_nama` `customers_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `customers_id` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `reference_jenis` `reference_jenis` varchar(100)  COLLATE utf8mb3_general_ci NULL after `point_nilai` , 
	CHANGE `reference_nomer` `reference_nomer` varchar(100)  COLLATE utf8mb3_general_ci NULL after `reference_id` , 
	CHANGE `cabang_nama` `cabang_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `gudang_nama` `gudang_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang_id` , 
	CHANGE `cabang2_nama` `cabang2_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cabang2_id` , 
	CHANGE `gudang2_nama` `gudang2_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang2_id` , 
	CHANGE `cash_account` `cash_account` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang2_nama` , 
	CHANGE `cash_account__nama` `cash_account__nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cash_account` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `lokasi` 
	DROP COLUMN `toko_id` , 
	DROP COLUMN `lokasi_gang_ruang_nama` , 
	DROP COLUMN `lokasi_gang_ruang_id` , 
	DROP COLUMN `lokasi_gang_id` , 
	DROP COLUMN `lokasi_gang_nama` , 
	DROP COLUMN `last_update` ;

/* Drop in Second database */
DROP TABLE `lokasi_gang`;


/* Drop in Second database */
DROP TABLE `lokasi_gang_ruang`;


/* Drop in Second database */
DROP TABLE `lokasi_gang_ruang_lantai`;


/* Drop in Second database */
DROP TABLE `lokasi_gang_ruang_lantai_gedung`;


/* Alter table in target */
ALTER TABLE `online_payment` 
	CHANGE `logo_img` `logo_img` text  COLLATE utf8mb3_general_ci NULL after `nama` , 
	CHANGE `merchant_id` `merchant_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `toko_id` , 
	CHANGE `client_key` `client_key` varchar(255)  COLLATE utf8mb3_general_ci NULL after `merchant_id` , 
	CHANGE `server_key` `server_key` varchar(255)  COLLATE utf8mb3_general_ci NULL after `client_key` , 
	CHANGE `jenis_payment` `jenis_payment` varchar(255)  COLLATE utf8mb3_general_ci NULL after `server_key` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `per_customer_level` 
	CHANGE `nama` `nama` varchar(65)  COLLATE utf8mb3_general_ci NULL after `last_update` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `pos_old_produk` 
	CHANGE `subtotal` `subtotal` decimal(18,4)   NULL after `total_diskon_produk` , 
	DROP COLUMN `diskon_tambahan_nilai` , 
	DROP COLUMN `add_disc` ;

/* Alter table in target */
ALTER TABLE `produk_hit` 
	CHANGE `produk_nama` `produk_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_id` , 
	CHANGE `toko_id` `toko_id` varchar(128)  COLLATE utf8mb3_general_ci NULL after `produk_nama` , 
	CHANGE `modul` `modul` varchar(128)  COLLATE utf8mb3_general_ci NULL after `supplier_id` , 
	CHANGE `jenis` `jenis` varchar(128)  COLLATE utf8mb3_general_ci NULL after `trash` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `produk_validation_test` 
	CHANGE `nama` `nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `barcode` `barcode` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nama` , 
	CHANGE `satuan` `satuan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `persediaan` , 
	CHANGE `folder_nama` `folder_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `valid_barcode` , 
	DROP COLUMN `cari_kolom` , 
	ADD COLUMN `cari_kolom` text  COLLATE utf8mb3_general_ci NULL VIRTUAL GENERATED after `folder_nama` , 
	CHANGE `boleh_jual` `boleh_jual` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cari_kolom` , 
	CHANGE `last_edit` `last_edit` varchar(255)  COLLATE utf8mb3_general_ci NULL after `boleh_jual` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `satuan_produk_relasi` 
	CHANGE `produk_nama` `produk_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_id` , 
	CHANGE `satuan_nama` `satuan_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `satuan_id` , 
	CHANGE `toko_id` `toko_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `qty` , 
	CHANGE `satuan_dasar_nama` `satuan_dasar_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `satuan_dasar_id` , 
	CHANGE `barcode` `barcode` varchar(100)  COLLATE utf8mb3_general_ci NULL after `no_urut` , 
	CHANGE `sku` `sku` varchar(100)  COLLATE utf8mb3_general_ci NULL after `barcode` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `set_menu_group_ui` 
	CHANGE `group_jenis` `group_jenis` varchar(32)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `group_nama` `group_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `group_id` , 
	CHANGE `menu_jenis` `menu_jenis` varchar(255)  COLLATE utf8mb3_general_ci NULL after `group_nama` , 
	CHANGE `menu_nama` `menu_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `menu_jenis` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `set_ux` 
	CHANGE `employee_nama` `employee_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `employee_id` , 
	CHANGE `menu` `menu` varchar(32)  COLLATE utf8mb3_general_ci NULL after `employee_nama` , 
	CHANGE `judul` `judul` varchar(255)  COLLATE utf8mb3_general_ci NULL after `menu` , 
	CHANGE `default_key` `default_key` varchar(32)  COLLATE utf8mb3_general_ci NULL after `judul` , 
	CHANGE `default_nilai` `default_nilai` varchar(255)  COLLATE utf8mb3_general_ci NULL after `default_key` , 
	CHANGE `keterangan` `keterangan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `default_nilai` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `setting_cashflow` 
	CHANGE `rekening` `rekening` varchar(64)  COLLATE utf8mb3_unicode_ci NULL first , 
	CHANGE `head_code` `head_code` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `rekening` , 
	CHANGE `p_head_code` `p_head_code` varchar(11)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `head_code` , 
	CHANGE `head_name` `head_name` varchar(100)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `p_head_code` , 
	CHANGE `p_head_name` `p_head_name` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `head_name` , 
	CHANGE `head_type` `head_type` char(1)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `head_level` , 
	CHANGE `extern_jenis` `extern_jenis` varchar(255)  COLLATE utf8mb3_unicode_ci NULL COMMENT 'jenis sumber(produk,customer,vendor, dll)' after `head_type` , 
	CHANGE `create_by` `create_by` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `depreciation_rate` , 
	CHANGE `update_by` `update_by` varchar(50)  COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '' after `create_date` , 
	CHANGE `toko_id` `toko_id` varchar(255)  COLLATE utf8mb3_unicode_ci NULL DEFAULT '0' after `is_rekening_pembantu` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_unicode_ci' ;

/* Alter table in target */
ALTER TABLE `settlement_idempotency_registry` 
	CHANGE `idempotency_key` `idempotency_key` varchar(128)  COLLATE utf8mb3_general_ci NOT NULL after `id` , 
	CHANGE `request_hash` `request_hash` char(64)  COLLATE utf8mb3_general_ci NOT NULL after `idempotency_key` , 
	CHANGE `machine_id` `machine_id` varchar(64)  COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' after `request_hash` , 
	CHANGE `date_settlement` `date_settlement` varchar(32)  COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' after `machine_id` , 
	CHANGE `id_penjualan_hash` `id_penjualan_hash` char(64)  COLLATE utf8mb3_general_ci NOT NULL after `date_settlement` , 
	CHANGE `status` `status` varchar(20)  COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'PROCESSING' after `id_penjualan_hash` , 
	CHANGE `settlement_id` `settlement_id` varchar(128)  COLLATE utf8mb3_general_ci NULL after `status` , 
	CHANGE `trace_id` `trace_id` varchar(128)  COLLATE utf8mb3_general_ci NULL after `settlement_id` , 
	CHANGE `error_code` `error_code` varchar(64)  COLLATE utf8mb3_general_ci NULL after `trace_id` , 
	CHANGE `error_message` `error_message` text  COLLATE utf8mb3_general_ci NULL after `error_code` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `stok_opname_xls` 
	CHANGE `file_name` `file_name` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `file_type` `file_type` varchar(255)  COLLATE utf8mb3_general_ci NULL after `file_name` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `full_path` `full_path` varchar(255)  COLLATE utf8mb3_general_ci NULL after `opname_dir` , 
	CHANGE `file_ext` `file_ext` varchar(24)  COLLATE utf8mb3_general_ci NULL after `full_path` , 
	CHANGE `jenis_tr` `jenis_tr` varchar(24)  COLLATE utf8mb3_general_ci NULL after `file_ext` , 
	CHANGE `transaksi_no` `transaksi_no` varchar(255)  COLLATE utf8mb3_general_ci NULL after `transaksi_id` , 
	CHANGE `gudang_nama` `gudang_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `gudang_id` , 
	CHANGE `jenis_produk` `jenis_produk` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang_nama` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `tmp_diskon` 
	CHANGE `jenis` `jenis` varchar(255)  COLLATE utf8mb3_general_ci NULL after `datas` , 
	CHANGE `cabang_nama` `cabang_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `customer_nama` `customer_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `customer_id` , 
	CHANGE `otorisator_nama` `otorisator_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `otorisator_id` , 
	CHANGE `otp` `otp` varchar(255)  COLLATE utf8mb3_general_ci NULL after `dtime_done` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `tmp_diskon_history` 
	CHANGE `jenis` `jenis` varchar(255)  COLLATE utf8mb3_general_ci NULL after `tmp_diskon_id` , 
	CHANGE `cabang_nama` `cabang_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `customer_nama` `customer_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `customer_id` , 
	CHANGE `otorisator_nama` `otorisator_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `otorisator_id` , 
	CHANGE `otp` `otp` varchar(255)  COLLATE utf8mb3_general_ci NULL after `dtime_done` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `today_transaksi_data_registry` DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_ApkTransaksi` 
	CHANGE `toko_id` `toko_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `nomor` `nomor` varchar(255)  COLLATE utf8mb3_general_ci NULL after `toko_id` , 
	CHANGE `oleh_id` `oleh_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `datetime` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `settlement_app` `settlement_app` varchar(255)  COLLATE utf8mb3_general_ci NULL after `settlement_tgl` , 
	CHANGE `diskon_total` `diskon_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `settlement_app` , 
	CHANGE `pajak_total` `pajak_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `diskon_total` , 
	CHANGE `grand_total` `grand_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `pajak_total` , 
	CHANGE `bayar_total` `bayar_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `grand_total` , 
	CHANGE `kembalian` `kembalian` varchar(255)  COLLATE utf8mb3_general_ci NULL after `bayar_total` , 
	CHANGE `apk_version` `apk_version` varchar(255)  COLLATE utf8mb3_general_ci NULL after `kembalian` , 
	CHANGE `status` `status` varchar(255)  COLLATE utf8mb3_general_ci NULL after `apk_version` , 
	CHANGE `trash` `trash` varchar(255)  COLLATE utf8mb3_general_ci NULL after `status` , 
	CHANGE `validGrandTotal` `validGrandTotal` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk` , 
	CHANGE `stepCode` `stepCode` varchar(255)  COLLATE utf8mb3_general_ci NULL after `validGrandTotal` , 
	CHANGE `txtCatatan` `txtCatatan` text  COLLATE utf8mb3_general_ci NULL after `stepCode` , 
	CHANGE `metode_bayar_id` `metode_bayar_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `txtCatatan` , 
	CHANGE `metode_bayar_nama` `metode_bayar_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `metode_bayar_id` , 
	CHANGE `pembatalan` `pembatalan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `metode_bayar_nama` , 
	CHANGE `alasan_pembatalan` `alasan_pembatalan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `pembatalan` , 
	CHANGE `pembatalan_sebagian` `pembatalan_sebagian` varchar(255)  COLLATE utf8mb3_general_ci NULL after `alasan_pembatalan` , 
	CHANGE `nama_kasir` `nama_kasir` varchar(255)  COLLATE utf8mb3_general_ci NULL after `pembatalan_sebagian` , 
	CHANGE `nama_toko` `nama_toko` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nama_kasir` , 
	CHANGE `alamat_toko` `alamat_toko` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nama_toko` , 
	CHANGE `telp_pemilik` `telp_pemilik` varchar(255)  COLLATE utf8mb3_general_ci NULL after `alamat_toko` , 
	CHANGE `extra_struk` `extra_struk` varchar(255)  COLLATE utf8mb3_general_ci NULL after `telp_pemilik` , 
	CHANGE `id_meja` `id_meja` varchar(255)  COLLATE utf8mb3_general_ci NULL after `indexing_data` , 
	CHANGE `no_meja` `no_meja` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id_meja` , 
	CHANGE `nm_cust` `nm_cust` varchar(255)  COLLATE utf8mb3_general_ci NULL after `no_meja` , 
	CHANGE `joinID` `joinID` varchar(255)  COLLATE utf8mb3_general_ci NULL after `settlement` , 
	CHANGE `bill_number` `bill_number` varchar(255)  COLLATE utf8mb3_general_ci NULL after `joinID` , 
	CHANGE `pembulatan` `pembulatan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `bill_number` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_ApkTransaksiData` 
	CHANGE `toko_id` `toko_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `nomor` `nomor` varchar(255)  COLLATE utf8mb3_general_ci NULL after `toko_id` , 
	CHANGE `bill_number` `bill_number` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nomor` , 
	CHANGE `oleh_id` `oleh_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `datetime` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `diskon_total` `diskon_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_nama` , 
	CHANGE `grand_total` `grand_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `diskon_total` , 
	CHANGE `bayar_total` `bayar_total` varchar(255)  COLLATE utf8mb3_general_ci NULL after `grand_total` , 
	CHANGE `kembalian` `kembalian` varchar(255)  COLLATE utf8mb3_general_ci NULL after `bayar_total` , 
	CHANGE `apk_version` `apk_version` varchar(255)  COLLATE utf8mb3_general_ci NULL after `kembalian` , 
	CHANGE `status` `status` varchar(255)  COLLATE utf8mb3_general_ci NULL after `apk_version` , 
	CHANGE `trash` `trash` varchar(255)  COLLATE utf8mb3_general_ci NULL after `status` , 
	CHANGE `validGrandTotal` `validGrandTotal` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk` , 
	CHANGE `stepCode` `stepCode` varchar(255)  COLLATE utf8mb3_general_ci NULL after `validGrandTotal` , 
	CHANGE `produk_id` `produk_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `stepCode` , 
	CHANGE `produk_nama` `produk_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_id` , 
	CHANGE `produk_harga` `produk_harga` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_nama` , 
	CHANGE `produk_folders` `produk_folders` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_harga` , 
	CHANGE `produk_folders_nama` `produk_folders_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_folders` , 
	CHANGE `txtCatatan` `txtCatatan` text  COLLATE utf8mb3_general_ci NULL after `produk_folders_nama` , 
	CHANGE `produk_qty` `produk_qty` varchar(255)  COLLATE utf8mb3_general_ci NULL after `txtCatatan` , 
	CHANGE `produk_subtotal` `produk_subtotal` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_qty` , 
	CHANGE `pembatalan` `pembatalan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `produk_subtotal` , 
	CHANGE `alasan_pembatalan` `alasan_pembatalan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `pembatalan` , 
	CHANGE `pembatalan_sebagian` `pembatalan_sebagian` varchar(255)  COLLATE utf8mb3_general_ci NULL after `alasan_pembatalan` , 
	CHANGE `extra_struk` `extra_struk` varchar(255)  COLLATE utf8mb3_general_ci NULL after `pembatalan_sebagian` , 
	CHANGE `nama_toko` `nama_toko` varchar(255)  COLLATE utf8mb3_general_ci NULL after `extra_struk` , 
	CHANGE `alamat_toko` `alamat_toko` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nama_toko` , 
	CHANGE `telp_pemilik` `telp_pemilik` varchar(255)  COLLATE utf8mb3_general_ci NULL after `alamat_toko` , 
	CHANGE `nama_kasir` `nama_kasir` varchar(255)  COLLATE utf8mb3_general_ci NULL after `telp_pemilik` , 
	CHANGE `id_meja` `id_meja` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nama_kasir` , 
	CHANGE `no_meja` `no_meja` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id_meja` , 
	CHANGE `nm_cust` `nm_cust` varchar(255)  COLLATE utf8mb3_general_ci NULL after `no_meja` , 
	CHANGE `joinID` `joinID` varchar(255)  COLLATE utf8mb3_general_ci NULL after `nm_cust` , 
	CHANGE `settlement_app` `settlement_app` varchar(255)  COLLATE utf8mb3_general_ci NULL after `settlement_tgl` , 
	CHANGE `metode_bayar_nama` `metode_bayar_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `settlement` , 
	CHANGE `metode_bayar_id` `metode_bayar_id` varchar(255)  COLLATE utf8mb3_general_ci NULL after `metode_bayar_nama` , 
	CHANGE `pembulatan` `pembulatan` varchar(255)  COLLATE utf8mb3_general_ci NULL after `metode_bayar_id` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_consolidasi_logger` 
	CHANGE `filename` `filename` varchar(150)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `table_jenis` `table_jenis` varchar(100)  COLLATE utf8mb3_general_ci NULL after `filename` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_consolidasi_v2` 
	CHANGE `x_id` `x_id` int(11)   NULL after `id` , 
	CHANGE `write_date` `write_date` datetime   NULL DEFAULT 'current_timestamp()' after `trash` , 
	CHANGE `dtime` `dtime` datetime   NULL after `dtime_php` , 
	CHANGE `machine_id` `machine_id` varchar(50)  COLLATE utf8mb4_general_ci NULL after `dtime` , 
	CHANGE `fulldate` `fulldate` date   NULL after `jenis_label` , 
	CHANGE `nomer` `nomer` varchar(50)  COLLATE utf8mb4_general_ci NULL after `tgl` , 
	CHANGE `tagihan` `tagihan` decimal(15,2)   NULL DEFAULT 0.00 after `tagihan_bruto` , 
	CHANGE `kembali` `kembali` decimal(15,2)   NULL DEFAULT 0.00 after `bayar` , 
	CHANGE `cashback_nilai` `cashback_nilai` decimal(15,2)   NULL DEFAULT 0.00 after `debit_account__name` , 
	CHANGE `kasir_id` `kasir_id` int(11)   NULL after `produk_return_list` , 
	CHANGE `CPU_INFO` `CPU_INFO` text  COLLATE utf8mb4_general_ci NULL after `gudang_nama` , 
	CHANGE `pihakLevel` `pihakLevel` int(11)   NULL after `COM_INFO` , 
	CHANGE `point_transaksi` `point_transaksi` int(11)   NULL DEFAULT 0 after `cashback_persen` ;

/* Create table in target */
CREATE TABLE `transaksi_consolidasi_v2_old`(
	`id` int(11) NOT NULL  auto_increment , 
	`write_date` datetime NULL  DEFAULT 'current_timestamp()' , 
	`x_id` int(11) NULL  , 
	`nomer` varchar(50) COLLATE utf8mb4_general_ci NULL  , 
	`nomer2` varchar(100) COLLATE utf8mb4_general_ci NULL  , 
	`tagihan` decimal(15,2) NULL  , 
	`diskon_tambahan_nilai` decimal(15,2) NULL  DEFAULT 0.00 , 
	`diskon_tambahan_persen` decimal(5,2) NULL  DEFAULT 0.00 , 
	`bayar` decimal(15,2) NULL  DEFAULT 0.00 , 
	`kasir_id` int(11) NULL  , 
	`kasir_nama` varchar(100) COLLATE utf8mb4_general_ci NULL  , 
	`cabang_id` int(11) NULL  , 
	`cabang_nama` varchar(150) COLLATE utf8mb4_general_ci NULL  , 
	`gudang_id` int(11) NULL  , 
	`gudang_nama` varchar(150) COLLATE utf8mb4_general_ci NULL  , 
	`machine_id` varchar(50) COLLATE utf8mb4_general_ci NULL  , 
	`CPU_INFO` text COLLATE utf8mb4_general_ci NULL  , 
	`COM_INFO` varchar(100) COLLATE utf8mb4_general_ci NULL  , 
	`dtime` datetime NULL  , 
	`fulldate` date NULL  , 
	`kembali` decimal(15,2) NULL  DEFAULT 0.00 , 
	`paymentMethod` varchar(50) COLLATE utf8mb4_general_ci NULL  , 
	`paymentMethod__name` varchar(100) COLLATE utf8mb4_general_ci NULL  , 
	`pihakLevel` int(11) NULL  , 
	`pihakLevelNama` varchar(100) COLLATE utf8mb4_general_ci NULL  , 
	`customerID` int(11) NULL  DEFAULT 1 , 
	`customerName` varchar(100) COLLATE utf8mb4_general_ci NULL  DEFAULT 'Tunai' , 
	`cashback_persen` decimal(5,2) NULL  DEFAULT 0.00 , 
	`cashback_nilai` decimal(15,2) NULL  DEFAULT 0.00 , 
	`point_transaksi` int(11) NULL  DEFAULT 0 , 
	`point_nilai` decimal(15,2) NULL  DEFAULT 0.00 , 
	`point_set` tinyint(1) NULL  DEFAULT 0 , 
	PRIMARY KEY (`id`) , 
	UNIQUE KEY `nomer`(`nomer`) 
) ENGINE=InnoDB DEFAULT CHARSET='utf8mb4' COLLATE='utf8mb4_general_ci';


/* Alter table in target */
ALTER TABLE `transaksi_data_registry` 
	CHANGE `main` `main` longblob   NULL after `transaksi_id` , 
	DROP COLUMN `last_update` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_data_registry_consolidasi` 
	CHANGE `machine_id` `machine_id` varchar(64)  COLLATE utf8mb3_general_ci NULL after `x_id` , 
	CHANGE `thn` `thn` varchar(64)  COLLATE utf8mb3_general_ci NULL after `machine_id` , 
	CHANGE `bln` `bln` varchar(64)  COLLATE utf8mb3_general_ci NULL after `thn` , 
	CHANGE `week` `week` varchar(64)  COLLATE utf8mb3_general_ci NULL after `bln` , 
	CHANGE `tgl` `tgl` varchar(64)  COLLATE utf8mb3_general_ci NULL after `week` , 
	CHANGE `jam` `jam` varchar(64)  COLLATE utf8mb3_general_ci NULL after `tgl` , 
	CHANGE `menit` `menit` varchar(64)  COLLATE utf8mb3_general_ci NULL after `jam` , 
	CHANGE `detik` `detik` varchar(64)  COLLATE utf8mb3_general_ci NULL after `menit` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_data_registry_consolidasi_archives` 
	CHANGE `machine_id` `machine_id` varchar(64)  COLLATE utf8mb3_general_ci NULL after `x_id` , 
	CHANGE `thn` `thn` varchar(64)  COLLATE utf8mb3_general_ci NULL after `machine_id` , 
	CHANGE `bln` `bln` varchar(64)  COLLATE utf8mb3_general_ci NULL after `thn` , 
	CHANGE `week` `week` varchar(64)  COLLATE utf8mb3_general_ci NULL after `bln` , 
	CHANGE `tgl` `tgl` varchar(64)  COLLATE utf8mb3_general_ci NULL after `week` , 
	CHANGE `jam` `jam` varchar(64)  COLLATE utf8mb3_general_ci NULL after `tgl` , 
	CHANGE `menit` `menit` varchar(64)  COLLATE utf8mb3_general_ci NULL after `jam` , 
	CHANGE `detik` `detik` varchar(64)  COLLATE utf8mb3_general_ci NULL after `menit` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_data_registry_pos` 
	CHANGE `machine_id` `machine_id` varchar(64)  COLLATE utf8mb3_general_ci NULL after `transaksi_id` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_pemindahbukuan` 
	CHANGE `head_code` `head_code` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `p_head_code` `p_head_code` varchar(255)  COLLATE utf8mb3_general_ci NULL after `head_code` , 
	CHANGE `parent` `parent` varchar(255)  COLLATE utf8mb3_general_ci NULL after `p_head_code` , 
	CHANGE `rekening` `rekening` varchar(255)  COLLATE utf8mb3_general_ci NULL after `extern_id` , 
	CHANGE `sub_rekening` `sub_rekening` varchar(255)  COLLATE utf8mb3_general_ci NULL after `rekening` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `toko_nama` `toko_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `toko_id` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_point` 
	CHANGE `version` `version` varchar(100)  COLLATE utf8mb3_general_ci NULL DEFAULT 'WEB.POS.V1' after `id` , 
	CHANGE `machine_id` `machine_id` varchar(100)  COLLATE utf8mb3_general_ci NULL after `x_id` , 
	CHANGE `nomer` `nomer` varchar(100)  COLLATE utf8mb3_general_ci NULL after `machine_id` , 
	CHANGE `nomer2` `nomer2` varchar(100)  COLLATE utf8mb3_general_ci NULL after `nomer` , 
	CHANGE `jenis` `jenis` varchar(100)  COLLATE utf8mb3_general_ci NULL after `nomer2` , 
	CHANGE `customers_nama` `customers_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `customers_id` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `reference_jenis` `reference_jenis` varchar(100)  COLLATE utf8mb3_general_ci NULL after `point_nilai` , 
	CHANGE `reference_nomer` `reference_nomer` varchar(100)  COLLATE utf8mb3_general_ci NULL after `reference_id` , 
	CHANGE `cabang_nama` `cabang_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `gudang_nama` `gudang_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang_id` , 
	CHANGE `cabang2_nama` `cabang2_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cabang2_id` , 
	CHANGE `gudang2_nama` `gudang2_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang2_id` , 
	CHANGE `cash_account` `cash_account` varchar(100)  COLLATE utf8mb3_general_ci NULL after `gudang2_nama` , 
	CHANGE `cash_account__nama` `cash_account__nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `cash_account` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_pos_create_file_log` 
	CHANGE `db_table` `db_table` varchar(100)  COLLATE latin1_swedish_ci NULL after `id_machine` , 
	CHANGE `file_path` `file_path` varchar(200)  COLLATE latin1_swedish_ci NULL after `file_size` , 
	DROP COLUMN `checksum` , 
	DROP COLUMN `version` , 
	DROP COLUMN `actual_file_size` ;

/* Alter table in target */
ALTER TABLE `transaksi_registry` DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_settlement` 
	CHANGE `counter` `counter` varchar(32)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `approval_counter` `approval_counter` varchar(32)  COLLATE utf8mb3_general_ci NULL after `approval_dtime` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `cabang_id` , 
	CHANGE `cabang_nama` `cabang_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_nama` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `transaksi_status` 
	CHANGE `customer_nama` `customer_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `customers_id` , 
	CHANGE `transaksi_no` `transaksi_no` varchar(255)  COLLATE utf8mb3_general_ci NULL after `transaksi_id` , 
	CHANGE `master_nomer` `master_nomer` varchar(255)  COLLATE utf8mb3_general_ci NULL after `transaksi_no` , 
	CHANGE `jenisTr` `jenisTr` varchar(100)  COLLATE utf8mb3_general_ci NULL after `data_produk` , 
	CHANGE `oleh_nama` `oleh_nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `oleh_id` , 
	CHANGE `nomer_pl` `nomer_pl` varchar(100)  COLLATE utf8mb3_general_ci NULL after `payment_id` , 
	CHANGE `nomer_top` `nomer_top` varchar(100)  COLLATE utf8mb3_general_ci NULL after `id_pl` , 
	CHANGE `kurir_nama` `kurir_nama` varchar(100)  COLLATE utf8mb3_general_ci NULL after `id_top` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `va_notification` 
	CHANGE `nomor_payment` `nomor_payment` varchar(50)  COLLATE utf8mb3_general_ci NULL after `transaksi_id` , 
	CHANGE `tr_jenis_payment` `tr_jenis_payment` varchar(50)  COLLATE utf8mb3_general_ci NULL after `date_payment` , 
	CHANGE `nomor_credit_note` `nomor_credit_note` varchar(50)  COLLATE utf8mb3_general_ci NULL after `tr_jenis_payment` , 
	CHANGE `tr_jenis_credit_note` `tr_jenis_credit_note` varchar(50)  COLLATE utf8mb3_general_ci NULL after `date_credit_note` , 
	CHANGE `customer_nama` `customer_nama` varchar(50)  COLLATE utf8mb3_general_ci NULL after `customer_id` , 
	CHANGE `nomor_tagihan` `nomor_tagihan` varchar(50)  COLLATE utf8mb3_general_ci NULL after `customer_nama` , 
	CHANGE `bank_va_jenis` `bank_va_jenis` tinytext  COLLATE utf8mb3_general_ci NULL after `nomor_tagihan` , 
	CHANGE `brivaNo` `brivaNo` varchar(18)  COLLATE utf8mb3_general_ci NULL COMMENT 'BRIVA' after `bank_va_jenis` , 
	CHANGE `billAmount` `billAmount` varchar(18)  COLLATE utf8mb3_general_ci NULL COMMENT 'BRIVA' after `brivaNo` , 
	CHANGE `transactionDateTime` `transactionDateTime` varchar(10)  COLLATE utf8mb3_general_ci NULL COMMENT 'BRIVA' after `billAmount` , 
	CHANGE `journalSeq` `journalSeq` varchar(30)  COLLATE utf8mb3_general_ci NULL COMMENT 'BRIVA' after `transactionDateTime` , 
	CHANGE `terminalId` `terminalId` varchar(2)  COLLATE utf8mb3_general_ci NULL COMMENT 'BRIVA' after `journalSeq` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `z_tabel_lr_lain_lain` 
	CHANGE `rekening` `rekening` varchar(255)  COLLATE utf8mb3_general_ci NULL after `dtime` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `z_tabel_mutasi` 
	CHANGE `rekening` `rekening` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `nama` `nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `rekening` , 
	CHANGE `jenis` `jenis` varchar(255)  COLLATE utf8mb3_general_ci NULL after `status_saldo` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `z_tabel_mutasi_pembantu` 
	CHANGE `rekening` `rekening` varchar(255)  COLLATE utf8mb3_general_ci NULL after `id` , 
	CHANGE `nama` `nama` varchar(255)  COLLATE utf8mb3_general_ci NULL after `rekening` , 
	CHANGE `jenis` `jenis` varchar(255)  COLLATE utf8mb3_general_ci NULL after `status_saldo` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;

/* Alter table in target */
ALTER TABLE `z_transaksi_laporan` 
	CHANGE `nomer` `nomer` varchar(255)  COLLATE utf8mb3_general_ci NULL after `master_id` , 
	CHANGE `metode` `metode` varchar(255)  COLLATE utf8mb3_general_ci NULL COMMENT 'berisi reguler, edit, reject' after `nomer` , DEFAULT CHARSET='utf8mb3', COLLATE ='utf8mb3_general_ci' ;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;