标签: migrate

从 maven-jaxb2-plugin 0.14.0 迁移到 jaxb2-maven-plugin 2.5.0

分享一下我的移民经历

<plugin>
   <groupId>org.jvnet.jaxb2.maven2</groupId>
   <artifactId>maven-jaxb2-plugin</artifactId>
   <version>0.14.0</version>
Run Code Online (Sandbox Code Playgroud)

<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>jaxb2-maven-plugin</artifactId>
   <version>2.5.0</version>
Run Code Online (Sandbox Code Playgroud)

我们使用原始插件从 WSDL 文件生成源代码。有人请求使用 Java 11 而不是 Java 8,更改后原始插件生成了警告。

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/D:/mr/org/glassfish/jaxb/jaxb-runtime/2.3.0/jaxb-runtime-2.3.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Run Code Online (Sandbox Code Playgroud)

由于这个问题仍然被报告为 maven-jaxb2-plugin 中的错误,并且自 2018 年以来该插件没有更新,因此我们决定移动 mojo 插件。

原始执行情况如下:

<execution>
    <id>uniqa</id> …
Run Code Online (Sandbox Code Playgroud)

java migrate maven-jaxb2-plugin jaxb2-maven-plugin

9
推荐指数
1
解决办法
4800
查看次数

迁移匿名配置文件的最佳方式

是否存在隐式迁移所有参数的替代方法?或任何其他优点.

来自MSDN:

public void Profile_OnMigrateAnonymous(object sender, ProfileMigrateEventArgs args)
{
  ProfileCommon anonymousProfile = Profile.GetProfile(args.AnonymousID);

  Profile.ZipCode = anonymousProfile.ZipCode;
  Profile.CityAndState = anonymousProfile.CityAndState;
  Profile.StockSymbols = anonymousProfile.StockSymbols;

  ////////
  // Delete the anonymous profile. If the anonymous ID is not 
  // needed in the rest of the site, remove the anonymous cookie.

  ProfileManager.DeleteProfile(args.AnonymousID);
  AnonymousIdentificationModule.ClearAnonymousIdentifier(); 

  // Delete the user row that was created for the anonymous user.
  Membership.DeleteUser(args.AnonymousID, true);

}
Run Code Online (Sandbox Code Playgroud)

或者这是最好/唯一的方式?

asp.net profiling anonymous migrate

8
推荐指数
1
解决办法
1592
查看次数

rake db:migrate产生"rake aborted!找不到表"错误

我是Rails的新手,我正在为我的雇主构建一个简单的项目跟踪应用程序.我一直在我的Mac上开发应用程序并将其推送到github.我只是设法将我的github repo克隆到我公司防火墙后面的一个Windows框中,希望让同事们试用这个应用程序.

但是当我去rake db:migrate来初始化windows框中的数据库时,我收到以下错误消息:

$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Could not find table 'projects'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/connection_adapters/sqlite3_adapter.rb:29:in `table_structure'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/faker-0.3.1/lib/extensions/object.
rb:3:in `returning'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/connection_adapters/sqlite3_adapter.rb:28:in `table_structure'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/connection_adapters/sqlite_adapter.rb:228:in `columns'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/base.rb:1271:in `columns'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/base.rb:1279:in `columns_hash'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/base.rb:1578:in `find_one'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/base.rb:1569:in `find_from_ids'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_reco
rd/base.rb:616:in `find'
c:/Rails_Projects/molex_app/config/routes.rb:15
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_contro
ller/routing/route_set.rb:226:in `draw'
c:/Rails_Projects/molex_app/config/routes.rb:1
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_sup
port/dependencies.rb:145:in `load_without_new_constant_marking'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_sup
port/dependencies.rb:145:in `load'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_sup
port/dependencies.rb:521:in `new_constants_in'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_sup
port/dependencies.rb:145:in `load'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_contro
ller/routing/route_set.rb:286:in `load_routes!'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_contro
ller/routing/route_set.rb:286:in `each'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_contro
ller/routing/route_set.rb:286:in `load_routes!'
c:/RubyonRails/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_contro …
Run Code Online (Sandbox Code Playgroud)

rake ruby-on-rails migrate sqlite3-ruby

8
推荐指数
3
解决办法
1万
查看次数

Django:迁移表'forum_user'已经存在

我更改了Django模型,并使用Django schemamigration更新数据库.但是,当我这样做时python manager.py migrate app,它会抛出此错误消息:

_mysql_exceptions.OperationalError: (1050, "Table 'forum_user' already exists")
Run Code Online (Sandbox Code Playgroud)

django migrate django-south

8
推荐指数
1
解决办法
8044
查看次数

在Django中重命名模型(表)

所以我已经在我的数据库中为Django创建了模型,但现在想要重命名该模型.我已经更改了Meta类中的名称,然后进行迁移/迁移,但这只是创建了全新的表.

我也尝试过schemamigration但也没用,我正在使用Django 1.7

这是我的模特

class ResultType(models.Model):
    name = models.CharField(max_length=150)
    ut = models.DateTimeField(default=datetime.now)
    class Meta:
       db_table = u'result_type'

    def __unicode__(self):
        return self.name
Run Code Online (Sandbox Code Playgroud)

干杯

python django migrate renaming makemigrations

8
推荐指数
1
解决办法
9757
查看次数

仅运行下一个迁移文件

是否可以使用sequelize-cli仅运行下一个迁移文件?

我一直在浏览cli的文档和帮助部分,它似乎不是这样的功能.

例如,运行sequelize db:migrate:status命令时我有以下内容;

Loaded configuration file "config/config.js".
Using environment "development".
up   20170301090141-create-something.js
up   20170301133113-create-else.js
up   20170301133821-Update-some-stuff.js
up   20170301135339-create-some-model.js
up   20170307152706-update-some-stuff-two.js
down 20170316142544-create-an-index.js
down 20170421112638-do-some-refactor.js
Run Code Online (Sandbox Code Playgroud)

我想只运行20170316142544-create-an-index.js.

当然,我可以删除所有相关文件.然后我逐个添加每个迁移,在每个迁移之间运行"所有"迁移.但这似乎是野蛮的.

migrate sequelize-cli

8
推荐指数
3
解决办法
3636
查看次数

Angular 5 - > Angular 6 Rxjs .map()到.pipe(map())

我有一个Angular 5项目,它有许多模块和数百个组件.自从RxJs 6你必须使用

someObservable.pipe(map(...))
Run Code Online (Sandbox Code Playgroud)

代替

someObservable.map(...)
Run Code Online (Sandbox Code Playgroud)

我想将此项目从Angular 5迁移到6,但不想.map()手动更改每次出现.

Angular更新方面建议

rxjs-5-to-6-migrate -p src/tsconfig.app.json
Run Code Online (Sandbox Code Playgroud)

迁移到rxjs 6,但我担心这不能改变我的代码.

如何节省时间和变化从任何建议.map(),以.pipe(map())自动?

migrate rxjs angular

8
推荐指数
1
解决办法
2万
查看次数

return database_name == ':memory:' or 'mode=memory' in database_name TypeError: 'WindowsPath' 类型的参数不可迭代

您好,我是 python 和 django 的新手,我正在练习 django,但是当我命令 python manage.py makemigration 和 python manage.py migrate 时,我收到了标题中显示的错误。下面提到了完整的错误。

寻求帮助,谢谢

C:\Users\Manan\python projects\djangoandmongo\new_Socrai>python manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying …
Run Code Online (Sandbox Code Playgroud)

python django migrate mongodb makemigrations

8
推荐指数
1
解决办法
5489
查看次数

无法在 Ubuntu 20.4 上安装 golang 迁移库

按照文档中的步骤进行

$ curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
$ echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/migrate.list
$ apt-get update
$ apt-get install -y migrate
Run Code Online (Sandbox Code Playgroud)

我在第一步中遇到的错误是

    sudo curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0E: This command can only be used by root.
  0     0    0     0    0     0 …
Run Code Online (Sandbox Code Playgroud)

migrate go golang-migrate

7
推荐指数
2
解决办法
1万
查看次数

错误:在从 Framework 升级到 .Net6 的过程中,在目标项目工作区下找不到文件...的文档

当我尝试通过迁移工具将项目从 Framework 升级到 .Net6 时,我收到一条错误消息:

错误:在目标项目工作区下找不到文件“Some File Path”的文档

我找不到答案,想要一个正确的解决方案,这会对我有帮助。我已删除隐藏文件夹并排除文件夹和文件,并且迁移成功完成。

我无法在任何其他资源上找到答案。

.net migration frameworks migrate

7
推荐指数
1
解决办法
899
查看次数