I have a knex chema migration to create a table, with the line - exports.up = async function(knex) { return knex.schema.createTable("newTable", table => { ta
I have a knex chema migration to create a table, with the line - exports.up = async function(knex) { return knex.schema.createTable("newTable", table => { ta
I migrated my data to M1 Monterey MacOS from intel macmini. I was happy to use django and mariadb until I installed a package using homebrew. I installed homebr
I have a requirement to create a room reservation system with dynamic booking slots (a reservation can start at any time and last anywhere from 15 minutes up to
I'm trying to make a history page where users can see the videos they recently uploaded or downloaded. I'm writing it in NextJS. I'm using Mysql to store the da
Foreign key 'FK_NhanVien.....' references invalid table 'PhongBan". Why is it invalid? create table NhanVien( MaNV varchar(9) not null primary key foreign k
I have one table with below column Table I want to find missing nodes Missing node definition: node present on day and missing the next day will be missing node
Just want to ask if how can I use the INNER JOIN function on CodeIgniter 4? I'm trying to convert the SQL statement below to CodeIgniter 4 but since I'm just ne
Let say yesterday was Wednesday; I need to get all records for Wednesday of previous week. How to achieve this in MySQL statement condition?
CodeIgniter 4 has a handy solution for migrations and seeders. Without the usage of foreign keys, everything is working perfectly. But when I use foreign keys I
After beating my head against the wall for a bit, I've decided I need help from the gurus here on stackoverflow. It's very possible I'm missing something incre
Is it possible this? I have the following table: Col1 Col2 col3 code1 US 9 code1 0 5 code2 US 4 code2 0 11 code3 0 11 and I'm trying to get the higher col3 va
I want to run a mysql container in windows server 2019. For that, Im using this image: vdkhiem/advancedmysqlcore:5.7.27 When I use this docker-compose file it w
I try to use View to create a constraint on a Mysql Table. I have one table with cinemas sessions and one other for tickets, the goal is we can't sell tickets w
I have a column which is in varbinary. I tried select cast(msg as varchar) from table WHERE DATE(datestr) > CURRENT_DATE - INTERVAL '7' DAY which threw C
I am trying to connect to my Google Cloud SQL instance with PHP (I am using PDO). When running my PHP file (from in the Google Cloud terminal), I receive the fo
I am receiving the error of SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 102 i
Here What I did is I have a user entity and a role entity. Every user can have one role. I have set up many-one relationship in role entity. I have create an en
Surveys table: enter image description here Questions table: enter image description here My sql query: SELECT s.id, q.question FROM questions q JOIN surveys s
Looks like my ORM, Prisma, does not allow for rolling back a migration. How have folks using Prisma rolled back a migration? Is there a way to manually rollback