Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Lara_Love's avatar

create table between or after table

how can create map table between 2 tables ?

Create a table between two other tables. It is not a relationship. I made the tables, now I want to add another table imagine 1 2 4 5 6 7 8 Now I understand that I didn't make table 3 and I have to make between 2 and 4

0 likes
17 replies
Lara_Love's avatar

Hello @tykus Create a table between two other tables. It is not a relationship. I made the tables, now I want to add another table imagine 1 2 4 5 6 7 8 Now I understand that I didn't make table 3 and I have to make between 2 and 4

Sinnbeck's avatar

@LoverToHelp how is "map between sliders and projects" not a relationship? What is the point of the table? What does "between" mean then?

tykus's avatar

@LoverToHelp do you mean rows; if 1 2 3 4 5 6 7 8 etc, are primary keys, then you don't want to be interfering with them! What are you actually wanting to achieve here; what is the context?

click's avatar

@LoverToHelp You mean a migration to create the table?

If they depend on each other somehow you can create a new migration and change the timestamp of the migration file to a timestamp between the one of #2 and #4.

When done, run artisan migrate:fresh (this will wipe out your entire database and run all migrations again)

1 like
Lara_Love's avatar

I made the tables, now I want to add another table imagine name tables are : 1 2 4 5 6 7 8

Now I understand that I didn't make table 3 and I have to make between 2 and 4

Lara_Love's avatar

Please help / assuming their names are numbers 😄😄

Sinnbeck's avatar

@LoverToHelp Then you make a new table with a new migration and it will end up in the correct place alphabetically.

Lara_Love's avatar

I made all the tables. I did not make one that is original and has a foreign key. Now I have to delete and create the tables from scratch or is there a way

Lara_Love's avatar

Why didn't the creator of Laravel think that we might need a table in the middle of the path 😂😂

Please or to participate in this conversation.