laravel-newsletter icon indicating copy to clipboard operation
laravel-newsletter copied to clipboard

Unauthorized Error - New List Unauthorized

Open brifiction opened this issue 5 years ago • 2 comments

Hello Nathan,

Thank you for creating this, very grateful as I was testing it with mysql db and works well. However, I was testing this on SQL Server, and I keep getting an unauthorized error when creating a new list.

Beforehand, there were some migration errors as well such as below (produced from php artisan migrate, first initial migration):

SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Introducing FOREIGN KEY constraint 'subscriptions_mailing_list_id_foreign' on table 'subscriptions' may ca  
  use cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. (SQL: alter table "subscriptions" add constrai  
  nt "subscriptions_mailing_list_id_foreign" foreign key ("mailing_list_id") references "mailing_lists" ("id") on delete cascade)  

Any thoughts? I've basically php artisan serve in Windows 10 and connectionstring is to a local sql server developer edition, also laravel 5.7 version since I ran composer install. I'm still looking into the database migration files, if they need some altering or order change for sql server, but would like to hear your input about this issue.

Thank you.

Regards, Brian

brifiction avatar Oct 14 '18 07:10 brifiction

Thanks for leaving a reply @brifiction!

The quality of the written migrations is very poor so in I'm planning to rewrite them. I'll keep you updated!

NathanGeerinck avatar Oct 20 '18 07:10 NathanGeerinck

No worries @NathanGeerinck , I'm still new to Laravel and I'm learning a lot from your work (for example, defining security policies in Laravel). Thanks again, much appreciated :)

Regards, Brian Ng

brifiction avatar Oct 21 '18 07:10 brifiction