Database-migration Questions
Ad
How to update whole collection? Firebase Database migration
I've made some updates in article model and it's affects to all elements in the collection so i need to update whole collection. i don't
Laravel migration file 2 foreign keys can not be created
I am trying to create a new table where 2 foreign key will be set public function up() {
Laravel - php artisan migrate, table already exists
I am trying to run a new migration between two of my tables however when i run php artisan migrate it's showing:
How to seed specific table as part of migration - Laravel 5?
I have this commands php artisan db:seed --class=graphstableseeder that i need to run in my part of my code
Android - Room how to add foreign key reference to data migration
I have updated one of my room entities to include a foreign key. i must now include this change in my data migration but unsure on the sql
Set new fields' value after database migration in LoopBack 4
Loopback has easy way to deal with database migrations, which differs from the method that uses, for example, knex.js. in the
eslint Parsing error: Unexpected token up in migration.js
In my previous project i used this syntax for migration to mongodb: my_migration.js // 'use strict'; import slug from 'slugify';
How to create table in laravel without created_at and Updated_at column using migration
Can anyone know how to create table in laravel without created_at and updated_at column in table using a migration. i try this following code but
How to let ID autoincrement start from certain number in Laravel Migration
I want to write a laravel migration auto increment id as a primary key. i want to start this id with a another value rather than 1. how can i do
Error with data model in Laravel (SQLSTATE[42S01])
Good morning, i'm trying to do the data models for a workshop workers app. the problem comes with the guides and images data models. each guide
Ad
Laravel phpunit how to use diffent migrations for tests
I am trying to set up tests in laravel, but i want to run different migrations from those that usually run. the migrations that i run to
Separate table for each year in Laravel
How can implement tables based on year in laravel, like orders2020, orders2019, orders2018 etc. and how to
Migration not inserting data to table?
The below migration is running successfully with no errors but it's not inserting any data do table. why it can be? can some one tell me what is
Laravel: last migration
I'm using laravel and working on migrations. i am looking for records of the implementation of migrations. how does laravel find out how far the
Room Database Migration Issue with Unique Index
I was trying to upgrade my database version and in last version the table had a unique index created upon migration room gave me the following
Creating a joined table with laravel
I am using laravel 6. i want to create a joined table named meeting_user that should connect the tables meetings and
how to use data type as "blob" during migration in Laravel 6
I want to store html in the database as blob data type when i try to migrate getting errors schema::create('projects', function
"Migrate reset" not working when there is an error in code
In basic laravel application, in user class i added: use softdeletes; application is no longer working
Accessing command argument in a database migration file
I would like to get my inputted command argument(s) in a database migration file. is this possible without having to fetch the $_server global and
Database migrations in Flask without SQLAlchemy
Is there any library or tool to perform database migrations in python without sqlalchemy? i am using a postgresql database and the queries are raw
" SQLSTATE[42S02]: Base table or view not found" when running migration
I am currently working on a coursework for developing a cms with laravel. i did some changes to my pages as i wanted to give them an "position"
Ad
Call to undefined relationship [pointage] on model [App\Salarie]?
I want to display the pointage, and salary table data from controllersalarie, but it gives me this error pointage
Database migrating only working with 127.0.0.1 but access from website is localhost with homestead
I have a homestead setup in users/[username]/homestead and setup a vagrant to run several websites and this is working fine.
Cannot add foreign key constraint in Laravel
I have an app where users belong to a team. here is my test: /** @test */ public function it_has_many_users() { $team =
Android Room migration didn't properly handle (wrong columns order)
I am making a migration using room database. i am getting this error: java.lang.illegalstateexception: migration didn't properly
foreign key laravel migration
This is my students migration and i want to have foreign key in it named subject_id: public function
errno: 150 "Foreign key constraint is incorrectly formed" but check everything I know
The problem when running migration, the last table end up with the error in the title. my database is a local mysql.
General error: 1364 Field 'manufacturer_name' doesn't have a default value
I get manufacturer name has no value even tho it references id column in manufacturer table which is already created in database and sits in the
1215 Cannot add foreign key constraint in laravel 5, foreign key
2019_04_23_164151_create_contacts_table.php migration file <?php use illuminate\support\facades\schema; use
Add new column to table
I'm still new as a developer and i'm trying to change user table, were i add a new column "user_type" from the previous table. my
Alter table inside schema - postgres + sequelize
I am using postgres + sequelize const db = //db connection stuffs.... db.authenticate().then((err) => { if (err) {
Laravel: Foreign key incorrectly formed
So i am busy with making this migration and afther a ton of research, he still gives me the following error message:
Ad
Laravel: 1215 Cannot add foreign key constraint - when migrating
I have table category which have parent of type of itself. schema::create('categories', function (blueprint $table) {
Alter ENUM column and add value to that column in Laravel
I have a mysql database with a table called user_level_attempt. that table has a enum type column with
How to removeConstraint defaultValue in Sequelize
I'm trying to write a migration in sequelize and want to remove the defaultvalue constraint. what is the proper syntax? i've tried both of the
How to Disable Enum Check In Laravel
I want to add another new enum column in the table, but not able to migrate, as it says column already exists.
Is it possible to change the order in which tables migrate in Laravel?
I am trying to migrate my newly created migrations. the problem is that the batch of migrations waiting to migrate is in the order in which i
Use trait in Laravel database migration
My superior told me i could create a seeder-like trait which i can then use inside a migration. when the
How to update Laravel database while using inner join in a migration
I have the following sql statement which is working directly in sql console, but i need to make it on a laravel migration.
Database applies ALL previous migrations on update and NOT just the new one
I'm developing a website which, as of current, both has a production and a test database. the production database is hosted externally while the
How can I create table in database without using laravel default way using command line
I am trying to take input from user as table name, field list with their type (integer or text) and save that in on table and then create a table
How to properly handle database data changes with laravel migrations and seeds
I have my migration files, which creates the initial schema for the database, and, i have my seed files, which populates the initial schema, with
Laravel have Two foreign Key from the same table
Hi i am not very good with database design so i would like to know if it's possible to create a table with two foreign key from the same
Ad
Access laravel migration and return the return the Blueprint table object
I wonder if there is a way that i can access the blueprint in migration file and return it in a external file. example, i have the following users
laravel change table in PHPMYADMIN without migration
I have several tables that i have created through migration. then, what happens if i change the table structure directly from phpmyadmin without
Import SQL dump into Typo3 installation without CREATE permission
I have a customer with a typo3 website that is hosted on a webserver with very restricting policies when it comes to database users. i
Core UI - Laravel -> Setting Up
I'm trying to make core ui - laravel work on my localhost
Migrating MySQL database contents to PostgreSQL
I refactored a project and wanted to try out postgresql instead of mysql. i now want to migrate the table contents of some tables. the
Class Based View - Fields aren't created in database (python Inherits\django cbv)
I'm trying create a model inherit following this tutorial:
update column value in laravel 5.4
i want to update privacy of a post my controller public function
how to add a new column between 2 columns in laravel
migration file public function up() { schema::create('posts', function (blueprint
Flyway 2 different migrations
Just picked up a project that is using flyway to rebuild the database. can't really change the tool without picking a fight with all other devs in
How is it possible to delete Flyway migrations
Colleagues! i have flyway files which have been already used in my project and i need to delete several of these files. ex: i have files with
Store foreign key value in laravel
In migration table: schema::create('passws', function (blueprint $table) { $table->increments('id');
Ad
Laravel : How can I change default indexing key length in morph table
I have table "invoice_relations" which is morph table. so in migration i wrote : $table->morphs('invoice_relations'); but it gives
Laravel Migration: get error when i want to add foreign key
I'm trying to create foreign keys in laravel however when i migrate my table using "artisan" i am thrown the following error and i do not know
Laravel Migration: auto incremented id as foreign key "errno: 150 "Foreign key constraint is incorrectly formed""
I was trying to migrate in laravel with foreign key that points to the auto incremented id of debiturs table:
Cannot add foreign key constraint [Laravel 5.6]
Tl;dr. solution: thanks to jonas. the problem was that
Setting default value for Laravel Migration
I am using laravel 5.6 and has a multi-auth funcitonality and it works fine. i have user and admin tables in my db. how can i set a default value
Migrate Microsoft Access Database to SQL Server Compact Edtion 4.0
I have created an application that uses a microsoft access database, which i am having some issues with and so want to migrate to microsoft sql
Using Laravel database migrations and seeds without Laravel
I have a laravel application which has the database set up using migrations. we have decided to move to phalcon for a number of reasons, and due
IlluminateDatabaseQueryException SQLSTATE[42P01]: Undefined table: 7 ERROR: during migration
I was trying to create a migration in laravel using the code here. but unfortunately it pops out an error like given here. i saw some answers
Data Migration in chunks in Laravel
We have lots of records in a table and we need to update all values of a column before we deploy some code. so we plan to update the table in
How to remove unique constraint from a column using Laravel migrations?
I have to remove a unique constraint from an email column using laravel migrations. here is my code: class alteremailtousers
How to make MongoDB's mongorestore update and replace files with the same _id
So we've recently setup sharding and we're migrating some of the data from several clients across several smaller databases into a bigger, sharded
Ad
Is there a way to change the mongoDB structure (from nested/embedded documents to list of object reference), while maintaining the data?
I have a mongodb database, used by nodejs via mongoose, and it involves nested/embedded documents like the following: "people" : [
Create laravel migration file from MySQL dump
There is a mysql request to create a table: create table if not exists `tb_edited_message` ( `id` bigint unsigned auto_increment
Is it possible to reset, and recreate firestore?
I'm trying to migrate my firestore database to a new location, since google added a new canadian region after we created our database in
MySql to SQL Server - SQL Server Migration Assistance tool is showing few tables
We have a database which has 511 tables and 'sql server migration assistance for mysql' is showing only 31 tables. i am using version-6.0.0. it is
How to append data to a JSON object during a select?
I'm in the progress of migrating data from an old system. i have some boolean columns, which can be true, false or
ID column in PostgreSQL (Laravel 5.8)
I'm creating a laravel application that lets users make a blog post. the post model looks like this: <?php namespace
Laravel 5.6: Table creation failed
I'm new to laravel and i'm trying to create tables using schema façade. i create the migration file with command php
Laravel 5.5 Consolidate migrations w/ production database
Hopefully, i can explain this well. i have a laravel application that has been in production for a minute. so, i have a bunch of migration
Prefix is not added to table on artisan migrate
I ran php artisan migrate, with empty value for prefix in the database config file. later i added a value for prefix in the
Room database migration if only new table is added
Let't assume, i have a simple room database: @database(entities = {user.class}, version = 1) abstract class appdatabase extends
Changing column in Laravel migration causes exception: Changing columns for table requires Doctrine DBAL
I'm trying to change the max length of one of my columns in table reserves in one migration. the code looks like this:
Ad
Unable to correctly restore postgres data: I get the same error I usually get if I haven't run syncdb and migrate
I have a django app with a postgres backend hosted on heroku. i'm now migrating it to azure. on azure, the django application code and postgres
How to rename two tables in one atomic operation in MySQL
I need to rename two tables in one atomic operation so that user will never be able to see the database in its intermediate state. i'm
What is the default type for a user in Django?
I have a mysql database object that stores concerts that a user plans to attend on a certain date. since each concert entry needs to be associated
Django database migration: merging two fields into one
Say i have a model that represents a product from my company. each product a product number (ex. 5928523), as well as a boolean representing
Laravel artisan migrate
I'm working on a site with the latest version of laravel, and we have recently changed the mysql db location from a remote host to a local host.
Cannot add foreign key constraint in Laravel Migrations
I currently have two tables symbols and prices. i am currently creating a migration for prices and adding a
What Laravel cache do I need to clear to remove error about missing migration file?
I've got a couple of migrations for tables within my app. the tables are: people skills media notes
Generate migration files from exsiting database structure Laravel
I have a system made with laravel. as we know, we can make database migrations in laravel using php artisan. so bacially, you
Laravel 5.2 base table or view not found error
I have just started working with laravel 5.2.. this is a simple migration file but when i run the php artisan migrate command i get the error
Connection refused when running October artisan command with docker exec in Jenkins
I'm trying to execute an octobercms migration through jenkins with a docker command, but i have the next error in jenkins console:
"failed to open stream" error when executing "migrate:make"
I am trying to create a simple database migration. but when i run the following command in the root directory of my project: php artisan migrate:make --create=users create_users_tab
Ad
Blog Categories
Ad