-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Bug: Empty Migration Files #43
Comments
I just tried the latest version (2.0.1, although I notice it calls itself 1.8.1 in the output files ... I'll fix that). I tried it with Sequel Ace (Version 3.4.4, Build 20021) and Sequel Pro Nightly build (Build 5446 (97c1b857)). In both cases, the files were generated just fine. This is on macOS Catalina (10.15.7). I know I had a similar issue when I started testing the plugin with Sequel Ace, and it required setting Full Disk Access in System Preferences > Security & Privacy > Privacy. I wonder if that needs to be reset in macOS Monterey? |
At this point, I assume it's all related to the security of the macOS (System Integrity Protection). I've already tried granting full disk access to SequalAce to no avail. I added some parse.sh67 | # Capture all error output to log file
68 | exec 2>> "$DESTDIR/error.log"
69 | error.log
I was able to run the PHP script from a terminal (non-root user), after the I don't understand why the bash scripts can run without incident but the PHP ones are blocked by security. Perhaps there is some obscure context in which the module's script is executed that is causing it to get trapped by security...? |
What do you get when you type |
Running
Not only did Apple remove PHP from that location (symlink or otherwise) but they prevented all interaction with that folder, even if you have root access. You have to disable SIP and reboot the mac to restore functionality to that folder - something I don't want to do. |
Exactly. So, unless I rewrite the PHP code into something else (natively supported in Monterey ... maybe python or node), then my bundle will have the requirement of needing PHP installed via some other method and I will need to change the path to PHP in my scripts. Out of curiosity, does |
I've just tried this today on Monterey. With Sequel Pro (latest nightly build) - it produces empty php files. With Sequel Ace (latest) - it doesn't seem to export any files at all. |
Any solutions? The same empty files on Mac M1. |
+1 |
Any solutions? The same empty files on macos 14 on Mac M2. |
yes the solution is on Mac M1. My error is there is no php on /usr/bin/php |
Did not work. |
I converted the code php (parse.php and MigrationParser.php) to javascript using Gemini to see if it worked, but it doesn't work either. |
@pedrosalpr |
I use PHP Monitor to have PHP versions. I have versions 7.4 and 8.3. The location of php is And it gave the same error: |
For what it's worth, both ChatGPT and Gemini did a remarkably useful attempt at converting a table schema into a Laravel migration file. I just copied the sql from Sequel Ace's "Table Info" tab > "Create syntax", and asked the AI this:
|
@pedrosalpr I have different php version installations ,
I activate it with |
As mentioned above, this tool will not work on newer versions of Mac OS that don't have PHP installed. Apple stopped bundling PHP in their OS, so you will either need to install it via brew, MacPorts, or some other method. Until I get time to re-write this tool to use something other than PHP to do the parsing and migration generation -- or until someone makes a PR with this rewrite! -- the tool probably won't work out-of-the-box. |
There appears to be an issue with the latest version of the plugin (2.0.1). I've tried running it using the latest versions of both SequalPro (v1.1.2) and SequalAce (v3.4.4), with SequalAce being the preferred app.
The tool behaves as before where it creates the PHP files in the SequalProLaravelExport folder, named as expected, however the files have "Zero bytes" as indicated in the finder view on my Mac.
I am running Mac version 12.0.1 which prevents installing PHP symlink to the location:
/usr/bin/php
I've tweaked the source code and change the location of PHP from
/usr/bin/php
to/usr/local/bin/php
to conform with the newer security standards for Mac OSX but that didn't resolve the issue.I've also tried different version of PHP including 7.4.26 (current) and the latest 8.1.0 (temporarily installed) but neither had an affect on the outcome.
As you can see from the file list below, I've successfully used this plugin in the past but something has changed since...

The text was updated successfully, but these errors were encountered: