Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "it's ok to do that in php"
-
So, you start with a PHP website.
Nah, no hating on PHP here, this is not about language design or performance or strict type systems...
This is about architecture.
No backend web framework, just "plain PHP".
Well, I can deal with that. As long as there is some consistency, I wouldn't even mind maintaining a PHP4 site with Y2K-era HTML4 and zero Javascript.
That sounds like fucking paradise to me right now. 😍
But no, of course it was updated to PHP7, using Laravel, and a main.js file was created. GREAT.... right? Yes. Sure. Totally cool. Gotta stay with the times. But there's still remnants of that ancient framework-less website underneath. So we enter an era of Laravel + Blade templates, with a little sprinkle of raw imported PHP files here and there.
Fine. Ancient PHP + Laravel + Blade + main.js + bootstrap.css. Whatever. I can still handle this. 🤨
But then the Frontend hipsters swoosh back their shawls, sip from their caramel lattes, and start whining: "We want React! We want SPA! No more BootstrapCSS, we're going to launch our own suite of SASS styles! IT'S BETTER".
OK, so we create REST endpoints, and the little monkeys who spend their time animating spinners to cover up all the XHR fuckups are satisfied. But they only care about the top most visited pages, so we ALSO need to keep our Blade templated HTML. We now have about 200 SPA/REST routes, and about 350 classic PHP/Blade pages.
So we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA 😑
Now the Backend grizzlies wake from their hibernation, growling: We have nearly 25 million lines of PHP! Monoliths are evil! Did you know Netflix uses microservices? If we break everything into tiny chunks of code, all our problems will be solved! Let's use DDD! Let's use messaging pipelines! Let's use caching! Let's use big data! Let's use search indexes!... Good right? Sure. Whatever.
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA + Redis + RabbitMQ + Cassandra + Elastic 😫
Our monolith starts pooping out little microservices. Some polished pieces turn into pretty little gems... but the obese monolith keeps swelling as well, while simultaneously pooping out more and more little ugly turds at an ever faster rate.
Management rushes in: "Forget about frontend and microservices! We need a desktop app! We need mobile apps! I read in a magazine that the era of the web is over!"
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + GraphQL + React + SPA + Redis + RabbitMQ + Google pub/sub + Neo4J + Cassandra + Elastic + UWP + Android + iOS 😠
"Do you have a monolith or microservices" -- "Yes"
"Which database do you use" -- "Yes"
"Which API standard do you follow" -- "Yes"
"Do you use a CI/building service?" -- "Yes, 3"
"Which Laravel version do you use?" -- "Nine" -- "What, Laravel 9, that isn't even out yet?" -- "No, nine different versions, depends on the services"
"Besides PHP, do you use any Python, Ruby, NodeJS, C#, Golang, or Java?" -- "Not OR, AND. So that's a yes. And bash. Oh and Perl. Oh... and a bit of LUA I think?"
2% of pages are still served by raw, framework-less PHP.32 -
10 years of repeating cycles of the following:
#interview
them: yeah, this is a gamedev position, c#, unity, prototyping, maybe some hololens r&d
me: cool! exactly what i was looking for, as i said a few times, i can't do php anymore, it literally causes me literal deppression.
them: don't worry, we have people for thaz, but we have nobody for c# and unity, with some art skills feel as well as you do.
me: great, glad we're on the same page. i'm taking the job! <3
them: great! oh btw, there's this enterprise intranet app in php that needs some additions, can you please do them?
me: ... what did we talk about during my interview?
them: yeah, but it's just gonna be a short thing, don't worry.
me: ...well...ok, i think i can do that.
*3 to 6 months still on the same, or the next, php enterprise bullshit app. i'm totally exhausted in all ways possible, stressed literally permanently, dreading every day, every new ticket, every meeting every contact with everyone, not able to give a shit about what i do anymore, thinking about suicide*
them: you lazy incompetent fuckup, you're fired!
* i stop communicating and coming out of my room for anything else than toilet, and shopping. stop communicating with my friends, with anyone, anxiety and exhaustion caused by even the thought of talking to anyone about anything, or doing anything, is usually unbearable. i spend 3 to 8 months like this, just sleeping, drinking, watching youtube, sometimes playing games but even that "activity", or rather even the thought of that "activity" is often exhausting. after that time, i kind of recuperate emotionally and mentally, start looking for another unity+c# gamedev job, find it, apply,
goto #interview8 -
I developed a simple scholarship management system for my school using Laravel, MySQL, jQuery and Bootstrap, I did it for free since college students from my country have to pay social service to get their degrees. Everyone in the scholarships department seemed to be really happy with my work and they evaluated my social service with 10/10, but yesterday they asked for one last favor: to go talk to the new social service guy who'll be supposed to maintain my project, a mid 30's dude who was really pissed off from the beginning because he wasn't even able to deploy the project, he wasn't even able to clone the project from Github. Ok, so I tried to explain to him the tools I used and how the project was structured, but everything I said seemed to piss him even more, so I stopped and had a chat like:
Me: "Look man, do you know or at least have basic concepts of PHP and MVC frameworks?"
Guy: "Yes, but I'm a project manager, not just –despectively– any programmer, and you didn't write proper documentation, it's impossible to deploy your project with the manual you wrote, I cannot work like this".
*We go to their computer and I clone and setup the project in 3 minutes.
Guy: "Yes, but I still don't know how the project works, I need everything documented. If I have to change something, I don't know where to look.
Me: "Man, that's why asked you about knowing PHP MVC frameworks".
Guy: "I cannot work like this, nothing is documented, I don't even know what's that software you're using *points at Sublime Text*. Or tell me, can you arrive at a place where they expect you to work with something you don't know and they have no documentation?"
*At this point he was really pissed
Me: "Well... Dealing with non-documented software is what I do for a living"
Guy: "I don't know what companies you've worked for, probably not big ones..."
Me: "Well, I actually work for *I mention one of the biggest music apps in the country*"
*Guy ironically laughs
When I gave my feedback to the lady in charge of the department, I told her that this guy was really pissed off at how things were done and that I wasn't so sure of him being capable of maintaining the system. She told me not to worry, that the guy became a well known asshole in the office only after a few days, and that she'll probably have to find something else for him to do. It'd be hilarious if this guy ends up capturing scholarships in the system I made.4 -
It has been bugging the shit out of me lately... the sheer number of shit-tier "programmers" that have been climbing out of the woodwork the last few years.
I'm not trying to come across as elitist or "holier than thou", but it's getting ridiculous and annoying. Even on here, you have people who "only do frontend development" or some other lame ass shit-stain of an excuse.
When I first started learning programming (PHP was my first language), it wasn't because I wanted to be a programmer. I used to be a member (my account is still there, in fact) of "HackThisSite", back when I was about 12 years old. After hanging out long enough, I got the hint that the best hackers are, in essence, programmers.
Want to learn how to do SQL injection? Learn SQL - write a program that uses an SQL database, and ask yourself how you would exploit your own software.
Want to reverse engineer the network protocol of some proprietary software? Learn TCP/IP - write a TCP/IP packet filter.
Back then, a programmer and a hacker were very much one in the same. Nowadays, some kid can download Python, write a "hello, world" program and they're halfway to freelancing or whatever.
It's rare to find a programmer - a REAL programmer, one who knows how the systems he develops for better than the back of his hand.
These days, I find people want the instant gratification that these simpler languages provide. You don't need to understand how virtual memory works, hell many people don't even really understand C/C++ pointers - and that's BASIC SHIT right there.
Put another way, would you want to take your car to a brake mechanic that doesn't understand how brakes work? I sure as hell wouldn't.
Watching these "programmers" out there who don't have a fucking clue how the code they write does what it does, is like watching a grown man walk around with a kid's toolbox full or plastic toys calling himself a mechanic. (I like cars, ok?!)
*sigh*
Python, AngularJS, Bootstrap, etc. They're all tools and they have their merits. But god fucking dammit, they're not the ONLY damn tools that matter. Stop making excuses *not* to learn something, Mr."IOnlyDoFrontEnd".
Coding ain't Lego's, fuckers.36 -
Worst exp. on a collab/group project?
Had a few, here is one.
Worked with a dev team (of two devs) in Norway to begin collaboration on providing a portal into our system (placing orders, retrieving customer info, inventory control, etc)
They spoke very good English, but motivation was the problem. Start the day around 10:00AM...take a two hour lunch...ended the day at, if I was lucky, 4:00PM (relative to Norway time). Response time to questions took days, sometimes weeks. We used Skype, which helped, but everything was "Yea...I'll do that tomorrow...waiting on X....I have a wedding to go to, so I'll finish my part next week."
I didn't care so much, I had other projects to do, but the stakeholders pounded me almost everyday demanding a progress report (why aren't you done yet...etc..etc.)
The badgering got so bad I told the project owner (a VP) if he wanted this project done by the end of the year, the company would have to fly me to Norway so I personally push things along.
When real money was on the line, he decided patience was warranted.
A 3 month project turned into 9, and during a phone meeting with the CEO in December
O: "Thanks guys, this project is going great. We'll talk again in February. Bye."
PM: "Whoa...what! February!"
<sounding puzzled>
O: "Um..yes? It's Christmas time. Don't you Americans take off for Christmas?"
PM: "Yes, but not until Christmas. Its only December 12th. Your taking the whole month of December and January for Christmas?"
O:"Yes, of course. You Americans work too hard. You should come over here and see how we celebrate. Takes about a month so we can ease back into the flow of things."
<Jack is the VP>
PM: "Jack wanted this project completed by the end of the year, that is what everyone agreed to."
O:"Yes, I suppose, but my plane is waiting on me. Not to worry, everything will be fine."
<ceo hangs up>
PM: "Oh shit..oh shit..oh shit. What are you going to do!?"
Me: "Me!?..not a darn thing. Better go talk with Jeff."
<Jeff is the VP>
J: "This is unacceptable. You promised this project would only take a few months. I told you there would be consequences for not meeting the deadline."
PM:"But..but...its not our fault."
J: "I don't care about fault. I care about responsibility. I've never had to fire anyone for not meeting a deadline, but .."
Me: "Jeff, they are in Norway and no one is working this project for the next two months. You've known for months about them dragging their asses on this project. We're ready to go. Services have been tested and deployed. Accounting has all the payment routing ready. Only piece missing is theirs."
J: "Oh. OK. Great job guys. I guess we'll delay this project until February."
<leave the office>
PM: "Holy shit I'm glad you were there. I thought I was fired."
Me: "Yea, and that prick would have done it not giving a crap that it's Christmas."
<fast forward to Feb>
O: "Our service provider fell through, so I'm hosting with another company. You guys know PHP? Perl? I don't know what they called it, but it sounded so cool I bought the company."
PM: "You bought what? Are we still working with Z and B?"
O:"Yea, sort of. How's your German? New guy only speaks German."
PM: "Um, uh... no one here speaks German"
O:"Not to worry, I speak German, French, and Italian. I'll be your translator."
PM: "What? French and Italian?"
O: "On my trip to France I connected with a importer who then got me in touch with international shipper in Italy. I flew over there and met a couple really smart guys than can help us out. My new guy only speaks German, J only speaks French, and R speaks Italian, Russian, and a little English. Not to worry, I'm full time on this project. You have my full attention."
We believe the CEO has/had some serious mental issues, including some ADD. He bailed within the first month (took another vacation to Sweden to do some fishing) and left me using Google Translate to coordinate the project. Luckily, by the end, the Norwegian company hired a contractor from England who spoke German and hobbled together the final integration.3 -
How come it is so hard to find good developers. Have been doing interviews for a couple of weeks now (for a senior PHP developer role).
First round is me talking about the function and company, asking questions about candidates experience, wishes and we usually end in some tech conversations. Most of the resumes I got are pretty fucking good. I mean, experience with low-level languages, experience with the problems we need to solve here, contributions to open-source, experience in R and MathLab etc etc. On paper they look perfect.
For the second round I give them an assessment which they can do at home on their own machine in their own time. It's not a hard one, just some mathmatical problems they need to solve. A quick google GIVES the answer (no joke!!). But that's OK, I look at their code cleanliness, proper use of commenting so I can determine if they are solo-developers or fit good in a team and if they abstract repeated functions and make sure that they take their work seriously, you know the drill.
It pisses me off that I get BROKEN FUCKING CODE WHICH DOES NOT EVEN RUN and that I get code back which I look at and makes me vomit instantly, I mean, DO YOU EVEN TAKE YOUR PROFESSION SERIOUS? How dare you to ask for 50k the year, a lease-car, extra bonusses AND YOUR FUCKING CODE SPITS OUT COMPLETLY WRONG ANSWERS OR DOES NOT EVEN RUN WHAT THE FUCK DUDE GO BACK TO FROM WHICH EVER HOLE YOU CRAWLED OUT AND STOP WASTING OTHER PEOPLES TIME WITH YOUR FUCKING INCOMPENTENCE...19 -
Client: here's what we want, a website where someone can directly edit any file on the website, php that java thingy all of it. Hell allow them to access, the os so they can see how that works to.
Me: ... Hey great idea ... We could set the server up in your offices ! I could link the server to all your computer's they can modify anything you have on there as well. That won't cause any issues.... At all.
Client: urm why?
Me: *hangs up* sigh ....
It's a fake scenario.... But how I feel like when I speak to clients 😐 based off what some guy wanted to do, a whole training thing for devs to learn how servers work ... The idea is ok to train... Say an apprentice, but he wanted to attach this to the Internet.... Not limit its use... Obviously way to expensive. -
Ok, I see a lot of hate about PHP and I always wondered what is the experiences people have had with PHP to like or dislike it.
Personally, PHP was the first programming language I learnt and used, so it has it's special place in my heart.
I acknowledge that it has it's pros and cons (as any other programming language). My hypothesis is : People have used php in a project they didn't like or didn't turned out how they expected. Or they used php for something it wasn't ment for.
Do people hate php because it's a trend ? How many php haters have good reasons to hate it that much ?
I'm just curious to know the thoughts and experiences (good or bad) of other devs.11 -
My first project, ever, was a very unproud thing that was developed...
A little detail - I was 12 back then.
So, a distant family member had a business of selling things that they brought to the country. They, of course, needed a website and my parents knew that I had some skills in development so suggested them my services.
Discussion started and well, what came out was this:
1. They need a site with items list.
2. It had no actual design plans, no actual requirements, just a list.
3. Oh. It had to work perfectly on IE4 or IE5 (can't remember).
So what was actually done, was a site full of divs, clearfixes and so buggy that opening in any other browser than IE - resulted in a total failure.
We have sat down and I, with all the respect told them that my skills are not sufficient to make all of the browsers work equally (I've been on HTML/CSS for more than 6 months back then. And all of it was after school). They calmed me down and said that it's ok, they can give me as much time as I need to figure things out. Yet, my English wasn't good back then so I couldn't... (I was 12, with 3 years of basic English as a non-native speaker).
We sat around the table, discussed what could be done and if I could investigate that and re-do when I'm fully ready. I agreed. The site was launched for IE only as it worked fine and others were just throwing an error to visit it with IE.
They were happy, people were using it and they didn't say that anything was bad. Of course, management was thru FTP and editing LIVE files because, well, no php, no control panels, nothing... I felt ashamed that the site wasn't what they wanted but they were ultra happy with it - first customers rolled in from there. They paid me around 60EUR at that time (it was ~12 years ago) and I've spent a month there. (minimum monthly wage here was around 90-120EUR at that time...
So, all in all, this project that I still think I failed - pushed me to the world of devs and... I've never regretted it. Of course, when I actually met with them after years - they have dropped the site as it was not needed anymore but they said that it was exactly what they needed and there was nothing wrong, even if it didn't work perfectly.2 -
So, it's been a while since I've been working on my current project and I've never had the "luck" to touch the legacy project wrote in PHP, until this week when I got my first issue.
And damn, this goddamn issue. It was a bug, a very strange bug, that only happens in production and that nobody has any idea what was happening, so yeah, I didn't have anyone to ask and I got less time than usual ( because Thanksgiving ).
And thus, I have no starting point, no previous knowledge on PHP and less time! I expected a very fun week 😀 and it was beyond my expectations.
First I tried to understand what might be causing the issue, but there wasn't any real clue to star with, so no choice, time to read the flow on the code and see what are they're doing and using ( 1k line files, yay, legacy ). Luckily I got some clues, we're using a cookie and a php session variable for the session, ok, let's star with the session variable. Where it's that been initialize ? Well, spoiler alert, I shouldn't start with that, because my search end up in the login method of the API that set a that variable and for some reason in the front end app it was always false and that lead me to think that some of the new backend functions were failing, but after checking the logs I got no luck.
Ok, maybe the cookie it's the issue, I should try open the previous website on the brow...redirect to new project login, What? Why ? I ask around and it's a new feature push on Monday, ok I got Chrome Dev tools I can see which value of the cookie it's been set and THERE IT WAS it has a wrong domain! After 2 days ( I resume a lot of my pain ) I got what I've been looking for, so now I should be able to fix the bug. Then where is the cookie initialized ? In the first file the server hits whenever you tried to enter any page of the app, ok, I found the method, but it's using a function that process the domain and sets it correctly? wtf ? Then how in heaven do I get the incorrect domain ? Hello? Ok, relax, you still have one more day to fix this, let's take it easy.
Then, at the end of the Wednesday, nope I still have no clue how this is happening. I talked with the Devops guy and he explain me how this redirection happens and with what it depends on, I followed the PHP code through and nothing, everything should works fine, sigh. Ok I still have 2 days, because I'm not from US and I'm not in US, so I still have time, but the Sprint is messed up already, so whatever I'm gonna had done this bug anyhow.
Thursday ! I got sick, yay, what else could happen this week. Somehow I managed to work a little and star thinking in what external issue could affect the processing, maybe the redirection was bringing a wrong direction, let's talk with the Devops guy again, and he answer me that the redirection it was being made by PHP code, IN A FILE THAT DOESN'T EXIST IN THE REPOSITORY, amazing, it's just amazing. Then he explained me why this file might be missing and how it's the deployment of this app ( btw the Devops guy it's really cool and I will invite him a beer ) . After that I checked the file and I see a random session_star in the first line of the code, without any configuration, eureka ! There was the cause and I only need to ask someone If that line it's necessary anymore, but oh they're on holiday, damn, well I'll wait till Monday to ask them. But once and for all that bug was done for ! 🎉
What do I learn ? PHP and that I don't want any more tickets of PHP 😆. -
I don't understand why languages like JavaScript and PHP decided to bolt on typing and object-oriented stuff retroactively. In fact, it actually makes me kind of angry.
The whole point of weakly-typed languages is so that you don't have to worry about the types. Everything that you do to an object is evaluated at runtime. The advantage of this is so you don't have to worry about types which improves speed of development. You do lose the benefits of strongly-typed languages, but I'm assuming everyone who uses a weakly-typed language is ok with that tradeoff, otherwise they would be using a strongly-typed language.
But then they go and add strongly-typed things to weakly-typed languages, like they somehow "discovered" that there are actually benefits to using strongly-typed languages. The thing is that adding this back in just dilutes the weakly-typed nature of the language to the point where you don't really get the benefits of its strongly-typed-ness or its weakly-typed-ness. And don't tell me you can just use either, because if you're working on a project with multiple people you can never really be sure what is going to happen if both the options are there.
I have an idea, how about we let Java be good at what it's good at and let JavaScript be good at what it's good at, and stop trying to make them into the same language. Languages have strengths and weaknesses and that's ok. We just have to learn what they are and when it's good to use certain languages over others.10 -
So first rant, here goes weirdness, and also lengthy rant
So in my company we have the hr and accounting managed by the same person which also deals with all things employee related and she had a need for a way to extract a birthday from, what is in our country the personal identification number, things go great i get a formula that performs parts of the magic up to the point where the first digit of the number dictates the gender and century to be used when forming the full year, mind you only the last two digits of the year are in plain within the id number so i thy a number of ideas. After bashing around google sheets for a while ( i've got open office installed and formulas don't export well to the excel that person uses but google sheets does so i built it there).
First idea : make a few conditionals to check for the value so we have 1 and 2 for 19th century, 3 and 4 for 18th century , 5 and 6 for 20th so i go ahead and write my conditions and they fail, all evaluates to false, it cascades through the else variants up to the last one so i'm wondering if the "if" itself doesn't support the or operator, seems it does, next i think it's the bloody condition written wrong so i reevaluate my logic in php in a test script, it works as intended, then i think ok not the right function called, let's see the docs, docs confirm i'm doing it right but what was wrong was the way i was getting that first number, using left seems to produce a string although the base thing is a number, now i start searching how i can cast it, like you would normaly do when the data type is fried, value function appears to be the solution but it isn't working....now i'm thinking "ok so i have a value and different things to print out so let's look for a switch, maybe it can understand that" switch function found under the form of choice, i get it sorted but am stuck wondering why the heck was the if and value combination not working.
Simple answer to that : value doesn't work well with function results, a known bug listed by someone in a comment, a comment i have failed to read for about 45 minutes of trying to understand.
All in all it worked well for the person asking for it so it's nice. -
Something I should've ranted a while ago, it just came to my mind
We had to learn html and css (I knew a lot about it already, heck, I'm building a website for someone)
So, we had to use object tags to embed parts of the page like you'd do with php
The thing that fucking annoyed me was the stuff that's in the files we had to refer to in the tags
You had
doctype
Html
Body
The whole fucking header with its title and fucking meta tags and shit
Why the fuck would you teach it like that?!
I would've posted a picture but I was too annoyed by the code and deleted everything I had from that course
Ah yeah, they told us to use bluefish
I used notepad++ since I'm not a noon and I know my html tags and css stuff
OK I just tried to unlock my laptop with my fingerprint a thousand times and the smiley just fucking winks at me.
don't wink at me, fucking LET ME IN
It's dual booted with Linux, to try Linux, I'm actually liking it so far.
couldn't find any drivers for the fingerprint sensor yet, but we'll seeundefined dual story not even the teachers fault dual boot irrelevant tags teaching toomanytags multiple html tags bad practice redundancy wrong tags -
Background: We switched from just simple old PHP and JS using notepad++ to PHPStorm and its infinite configurables, Symfony 4, Twig, Composer, Doctrine, Yarn, NPM, Bootstrap, ( thank the stars we didn't try to add Docker in with all this ), any other junk I'm missing here? Then upgraded to Symfony 5.
Symfony's autowiring: madness behind the curtains. I get frustrated about when and where I can just magically inject these dependencies or use config variables, you know, like the ones you define in service.yaml. Hmmm, "service".yaml. In a controller you can say getParameter() but in a service you have to inject the parameter, FROM THE "SERVICE".yaml!!! Autowiring drives me nuts. Ok, so we can supply dependencies using the constructor, that's great! Within a controller you never have to instantiate the object you're passing to the constructor (autowiring handles that). That's cool, weird when we you try to trace it for the first few times, but nice I guess. Feels like half-assin' it. What bugs me here is that it only works in controllers... I guess out of the box.. i'm not even sure. To get that feature to work for services you have to make some yaml edits. Right?Maybe? Some of the Symfony tutorials have you code up some junk then trash it. Change config then wipe that out and do X instead... so I have no idea what "out of the box" for Symfony really is.
Found this cool article that describes my frustrations in better terms and seems like a good resource to learn about autowiring. I need to continue my yaml wizardry classes. https://alanstorm.com/symfony-autow...
.....And on to YAMLs, or CSS, or JS or any other friggin' change you make to a file anywhere... Make a change, reload page, nothing... nope you have to do some hidden cheat combo of yarn dostuff -> cache:clear -> cache:warmup -> cache:cache:the:cache ... I really really hate this crap. Maybe I'm too old school for all this junk. It was simple with pure PHP. Edit code, push file, reload page, and oh look it changed! Done. So happy! Ok, Ok. Occasionally the js or css might get cached by the browser and you have to ctrl/f5 or Shift/f5 .. one of those. With this framework there's just so much more that you have to remember to do get some new feature of your site loaded.
Now, I totally get wanting to use some type of entity framework, but I feel like my entire world turned backwards. Designing tables using something like MySQL Workbench made sense. I can see all the columns and datatypes right there as i'm building them. From what I've experienced now with Symfony/Doctrine is you have to make and entity, get a shit-ton of question lobbed at you and if it's a relation field you have to really have a clear idea of the cardinality up front. Then we migrate that to the database. Carefully read through the SQL if you really really just want to use migrations:migrate in Prod. That alter table could cost you some some downtime if your table is large.
Some days man....