-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate houses/apartments from qb-houses/qb-apartments #89
Conversation
I thought, this was unused because we check their previous apartment when its created, unsure about their house though. If this works, it wouldnt be bad to include. Though it needs an admin check on the command. @MonkeyWhisper It would be good to see some testers for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets update the readme as well with a note about these two commands for migrating existing qb apartments and houses over
@ImXirvin I had only written up a migration for the apartment stashes. We didnt do anything to actually migrate existing apartments and houses over to ps-housing, this PR accomplishes that aspect. |
Tested and converted 270 properties and 7,740 apartments |
Co-authored-by: BackSH00TER <[email protected]>
@xXJamieXx Please update PR title to be a bit more descriptive, thx |
We shall get a couple of people to test this to make sure all is working. Great PR, thanks @xXJamieXx |
@xXJamieXx, can you add to the current README? Steps on what should be done, thanks! |
Proper event tiles
Worked for me. No errors everything works the same. I only had one house to for it to transfer just fyi. |
I tried this with my existing database of 2k player apartments and 1.4k houses Line 43 in dca4cff
|
What's the error? |
[ script:ps-housing] SCRIPT ERROR: @ps-housing/server/server.lua:80: attempt to index a nil value (local 'player') script:ps-housing] Cannot add or update a child row: a foreign key constraint fails ( |
This issue is with your database table script:ps-housing] Cannot add or update a child row: a foreign key constraint fails (QBCoreFramework_C5D6BE.properties, CONSTRAINT FK_owner_citizenid FOREIGN KEY (owner_citizenid) REFERENCES players (citizenid) ON DELETE CASCADE ON UPDATE CASCADE) |
ok i managed to sort that issue out, migratehouses command does nothing though O_O donsen't go after (print 5) |
Latest change should resolve this. Callback name was changed on client but not reflected on server. :) |
Shoot! That was my fault after I changed the callbacks name. |
okay now its working as intended, but I had to drop the garage vector column as it was giving me below error (2). Converted garages/houses have a different name compared to the original so the existing parked vehicles in garages don't sync with the converted ones Also Housing stashes doesn't get converted like in apartment stashes. (1) (2) |
Tested and working on a QBCore default with changes. |
Any solution? |
Overview
Finishes the migration code for converting from qb-houses and qb-apartments.
Details
The code was previously started but not fully functional.
Adds a list of shells with their corresponding "tiers" from qb-houses.
Houses requires a client to callback from to receive street and region data for each house.
Apartments are fairly straightforward.
UI Changes / Functionality
N/A
Testing Steps
From client or server run the
migrateapartments
command to convert all apartments from qb-apartments.From client run
migratehouses
command to convert all houses from qb-houses. Must be run from client as it fetches street and region data.