Closed josesydor closed 1 month ago
Hi Jose, Sure, with pleasure!
Try following, via config:
config.json
, set enable_extra_config: true
extra_config.json
, add lowerCaseAllColumnNames: true
at the root of the document.tables
and foreign_keys
sections.nmig
as usual.Hi Anatoly, Thank you for the quick reply. The column names are lowercase alright due to the extra_config, but no data was inserted. I still get this error:
--[populateTable] Error loading table data:
SELECT `Id` AS `Id`,REPLACE(`Label`, ' ', '') AS `Label`,`Order` AS `Order`,`AboutProductInformationStyle` AS `AboutProductInformationStyle` FROM `aboutproductinformation`;
Jose, hello again, I think, the issue is fixed now.
git pull
the latest changes from master
, or download the latest release v6.1.1
.config.json
, set enable_extra_config
to true
.lowerCaseAllColumnNames
, and set it true
.nmig
as usual.Please, let me know if the issue is resolved on your side.
I confirm it worked. Thank you kindly!
Also confirm changing datatypes mapping default worked, as I had to use citext for varchars and map bit to bool because, you know, in MariaDB/MySQL Bit(1) and Boolean are used interchangeably but, in PG, you cannot do, say: WHERE NOT (isSomething)
with bit datatypes (varying or not), only Bool
Great, glad it worked! Thank you, Sir!
On Sat, Aug 31, 2024, 4:10 PM josesydor @.***> wrote:
I confirm it worked. Thank you kindly! Also confirm changing datatypes mapping default worked, as I had to use citext for varchars and map bit to bool because, you know, in MariaDB/MySQL Bit(1) and Boolean are used interchangeably but, in PG, you cannot do, say: WHERE NOT (isSomething) with bit datatypes (varying or not), only Bool
— Reply to this email directly, view it on GitHub https://github.com/AnatolyUss/nmig/issues/130#issuecomment-2322893135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHR7N5SHORAD4FQDNU7NSLZUG6E5AVCNFSM6AAAAABNGXJO3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRSHA4TGMJTGU . You are receiving this because you commented.Message ID: @.***>
Hi there, First of, thank you for this tool, it's going to save me a lot of time.
But I need to figure out how to properly add lowerCaseAllColumnNames : true inside extra_config.json as it is not documented.
I tried to simply change ExtraConfigProcessor.ts with:
retVal = retVal.toLowerCase();
That indeed changed the column names to lowercase, but the tables didn't get populated because the insert sees them with the old names still: --[populateTable] Error loading table data: _
_
Can I get some help, please?