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

Schema::dropIfExists() not working in 11.2.2+ #853

Closed
staudenmeir opened this issue May 21, 2024 · 2 comments · Fixed by #854
Closed

Schema::dropIfExists() not working in 11.2.2+ #853

staudenmeir opened this issue May 21, 2024 · 2 comments · Fixed by #854
Labels

Comments

@staudenmeir
Copy link

staudenmeir commented May 21, 2024

Summary of problem or feature request

Hi @yajra,
Schema::dropIfExists() no longer works for me since version 11.2.2. The table doesn't get dropped when it exists.

I traced it to this change: dfebaf8

Code snippet of problem

Schema::dropIfExists('users');

Executed SQL in 11.2.1:

declare
    c int;
begin
    select count(*) into c from user_tables where table_name = upper('users');
    if c = 1 then
        execute immediate 'drop table users';
    end if;
end;

Executed SQL in 11.2.2:

declare
    c int;
begin
    select count(*) into c from user_tables where table_name = upper('"USERS"');
    if c = 1 then
        execute immediate 'drop table "USERS"';
    end if;
end;

The issue is this part where the table name gets wrapped in two pairs of quotes:

upper('"USERS"')

System details

  • Operating System: Ubuntu
  • PHP Version: 8.3.7
  • Laravel Version: 11.7.0
  • Laravel-OCI8 Version: 11.2.2 (and 11.2.3)
@yajra yajra added the bug label May 22, 2024
yajra added a commit that referenced this issue May 22, 2024
@yajra
Copy link
Owner

yajra commented May 22, 2024

Fixed in v11.2.4. thanks for reporting. 🍻

@staudenmeir
Copy link
Author

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants