Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an again: Seed Set IDEBTITY_INSERT Error caus of using 'statement' instead of 'unprepared' #4676

Closed
FrankWarius opened this issue Dec 22, 2022 · 1 comment

Comments

@FrankWarius
Copy link

SQLSTATE[23000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Ein expliziter Wert für die Identitätsspalte kann nicht in der wt1222_user-Tabelle eingefügt werden, wenn IDENTITY_INSERT auf OFF festgelegt ist. (SQL: insert into [wt1222_user] ([user_id], [user_name], [real_name], [email], [password]) values (-1, DEFAULT_USER, DEFAULT_USER, DEFAULT_USER, DEFAULT_USER))

#2 D:\GitRepos\fisharebest\webtrees\vendor\illuminate\database\Connection.php(498): Illuminate\Database\Connection->statement('insert into [wt...', Array)
#3 D:\GitRepos\fisharebest\webtrees\vendor\illuminate\database\Query\Builder.php(3218): Illuminate\Database\Connection->insert('insert into [wt...', Array)
#4 D:\GitRepos\fisharebest\webtrees\vendor\illuminate\database\Query\Builder.php(3336): Illuminate\Database\Query\Builder->insert(Array)
#5 D:\GitRepos\fisharebest\webtrees\app\Schema\SeedUserTable.php(45): Illuminate\Database\Query\Builder->updateOrInsert(Array, Array)
#6 D:\GitRepos\fisharebest\webtrees\app\Services\MigrationService.php(117): Fisharebest\Webtrees\Schema\SeedUserTable->run()

with all due respect: are you kidding me?

I provided you tested code and gave you the link #4668 (comment) why to use 'unprepared' instead of 'statement' but you changed it!

I'll fix it local again but don't provide another fix.

@fisharebest
Copy link
Owner

I provided you tested code and gave you the link #4668 (comment) why to use 'unprepared' instead of 'statement' but you changed it!

I asked if you had tried both - because I did not know the difference between the two statements.
According to the documentation, they are the same.

I did not wait for an answer. Sorry.

I am looking at a different database library (doctrine/dbal), and so I need to understand the exact requirements of this statement.

ddrury pushed a commit to ddrury/webtrees that referenced this issue Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants