From e087d1a9d7cbcf04a46fb488414b4a04944bb042 Mon Sep 17 00:00:00 2001 From: Othmane Ataallah <”othmane.ataallah.triztech@gmail.com”> Date: Mon, 18 May 2026 13:14:04 +0100 Subject: [PATCH] add pgloader config --- uses/distribution/distribution-remote.load | 43 ++++++++++++++++++++++ uses/stock/stock-remote.load | 43 ++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 uses/distribution/distribution-remote.load create mode 100644 uses/stock/stock-remote.load diff --git a/uses/distribution/distribution-remote.load b/uses/distribution/distribution-remote.load new file mode 100644 index 0000000..8d69a81 --- /dev/null +++ b/uses/distribution/distribution-remote.load @@ -0,0 +1,43 @@ +LOAD DATABASE + FROM mssql://sa:Root123456@192.168.100.150/TrizDistributionLife + INTO postgresql://pgadmin:MigrationPass2024@192.168.100.150/trizdistributionlife + +WITH + include drop, + create tables, + create indexes, + reset sequences, + prefetch rows = 10000 + +SET + postgresql parameters + client_encoding TO 'UTF8' + +CAST + type bigint to bigint drop typemod, + type int to integer drop typemod, + type smallint to smallint drop typemod, + type tinyint to smallint drop typemod, + type bit to boolean drop typemod, + type float to numeric drop typemod + using (lambda (v) (when v (format nil "~f" v))), + type real to numeric drop typemod + using (lambda (v) (when v (format nil "~f" v))), + type money to numeric drop typemod, + type smallmoney to numeric drop typemod, + type datetime to timestamp drop typemod, + type datetime2 to timestamp drop typemod, + type smalldatetime to timestamp drop typemod, + type date to date drop typemod, + type time to time drop typemod, + type uniqueidentifier to uuid drop typemod, + type nvarchar to text drop typemod, + type nchar to text drop typemod, + type varchar to text drop typemod, + type char to text drop typemod, + type ntext to text drop typemod, + type text to text drop typemod, + type varbinary to bytea drop typemod, + type image to bytea drop typemod, + type xml to text drop typemod +; \ No newline at end of file diff --git a/uses/stock/stock-remote.load b/uses/stock/stock-remote.load new file mode 100644 index 0000000..7b6833a --- /dev/null +++ b/uses/stock/stock-remote.load @@ -0,0 +1,43 @@ +LOAD DATABASE + FROM mssql://sa:Root123456@192.168.100.150/TrizStockMekahli + INTO postgresql://pgadmin:MigrationPass2024@192.168.100.150/trizstocklife + +WITH + include drop, + create tables, + create indexes, + reset sequences, + prefetch rows = 10000 + +SET + postgresql parameters + client_encoding TO 'UTF8' + +CAST + type bigint to bigint drop typemod, + type int to integer drop typemod, + type smallint to smallint drop typemod, + type tinyint to smallint drop typemod, + type bit to boolean drop typemod, + type float to numeric drop typemod + using (lambda (v) (when v (format nil "~f" v))), + type real to numeric drop typemod + using (lambda (v) (when v (format nil "~f" v))), + type money to numeric drop typemod, + type smallmoney to numeric drop typemod, + type datetime to timestamp drop typemod, + type datetime2 to timestamp drop typemod, + type smalldatetime to timestamp drop typemod, + type date to date drop typemod, + type time to time drop typemod, + type uniqueidentifier to uuid drop typemod, + type nvarchar to text drop typemod, + type nchar to text drop typemod, + type varchar to text drop typemod, + type char to text drop typemod, + type ntext to text drop typemod, + type text to text drop typemod, + type varbinary to bytea drop typemod, + type image to bytea drop typemod, + type xml to text drop typemod +; \ No newline at end of file