简体   繁体   English

我可以迁移一个表而不影响数据库中的数据吗?

[英]Can i migrate one table without affecting my data in the database?

我问是否可以在不影响数据库中的数据的情况下进行一个表的迁移,因为每次刷新我的所有字段都会被重置。

When you run php artisan migrate it would run any migrations that haven't yet been run and it wouldn't remove your existing data unless you're deleting columns. 当您运行php artisan migrate ,它将运行尚未运行的任何迁移,除非您删除列,否则它不会删除现有数据。 You could also run a specific single migration by adding the path to the file with the --path parameter, eg php artisan migrate --path=database/migrations/2019_04_10_migration_name.php . 您还可以通过使用--path参数添加文件路径来运行特定的单个迁移,例如php artisan migrate --path=database/migrations/2019_04_10_migration_name.php

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不影响数据库的情况下测试我的服务? - How can I test my services without affecting my database? 如何将数据从一个 PostgreSQL 数据库迁移到另一个(表/列名略有不同)? - How can I migrate data from one PostgreSQL database to another (with slightly different table/column names)? 如何在不先删除数据库的情况下将带有rails的数据库迁移到第一个修订版? - How can I migrate my database with rails to the first revision without dropping the database first? 如何在不更改其中数据的情况下将表的模式从一个数据库导入到另一个数据库中的现有表? - How can i import a schema of a table from one database to an existing table in another without altering the data in it? 我无法在laravel 5.6中将表迁移到数据库中 - I can't migrate table into database in laravel 5.6 在MSSQL中将数据从一个数据库表迁移到另一台服务器上的另一个表 - Migrate data from one database table to another one on another server in MSSQL 我可以将数据从一个数据库表复制到另一个已经存在的数据库表sql服务器吗? - Can i copy data from one database table to another already existing database table sql server? 我可以在不影响现有数据的情况下将列从VARCHAR更改为VARCHAR FOR BIT DATA - Can I alter a column from VARCHAR to VARCHAR FOR BIT DATA without affecting the existing data 如何迁移我的 heroku 数据库? - How do I migrate my heroku database? 我如何从 laravel 迁移到我的数据库 - How I migrate from laravel to my database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM