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

is it possible to specify Tablespace on Entity Framework core OnModelCreating #188

Open
omora opened this issue Aug 11, 2021 · 3 comments
Open

Comments

@omora
Copy link

omora commented Aug 11, 2021

For tables and indexes?
Thanks

@alexkeh
Copy link
Member

alexkeh commented Aug 11, 2021

No, there isn't. What are you trying to accomplish by specifying a tablespace?

@omora
Copy link
Author

omora commented Aug 12, 2021

When we apply the migration to create the database table and indexes it generates:
-- Create table
create table A01ARQ01.ARQ_EMAIL_ADJUNTO
(
"Id" RAW(16) not null,
"NombreFichero" NVARCHAR2(255),
"Binario" BLOB,
"EmailId" RAW(16) default '00000000000000000000000000000000' not null
)
tablespace ASSM_ARQAUD_DAT;
-- Create/Recreate indexes
create index INX_ARQ_EMAIL_ADJUNTO_01 on ARQ_EMAIL_ADJUNTO (EmailId)
tablespace ASSM_ARQAUD_DAT;
-- Create/Recreate primary, unique and foreign key constraints
alter table ARQ_EMAIL_ADJUNTO
add constraint INX_ARQ_EMAIL_ADJUNTO_PK primary key (ID)
using index
tablespace ASSM_ARQAUD_DAT;
alter table ARQ_EMAIL_ADJUNTO
add constraint FK_ARQ_EMAIL_ADJUNTO_ARQ_EMAIL_EmailId foreign key (EMAILID)
references ARQ_EMAIL (ID) on delete cascade;

It uses the default tablespace for the schema
Our DBA demand to create index tablespaces in a different one
create index INX_ARQ_EMAIL_ADJUNTO_01 on ARQ_EMAIL_ADJUNTO (EmailId)
tablespace ASSM_ARQAUD_IND;
and
alter table ARQ_EMAIL_ADJUNTO
add constraint INX_ARQ_EMAIL_ADJUNTO_PK primary key (ID)
using index
tablespace ASSM_ARQAUD_IND;

The work around is not to use migrations and create the tables and index with SQL , the traditional way.

it's a shame that because of this feature we can't use migrations

@alexkeh
Copy link
Member

alexkeh commented Aug 12, 2021

@omora Thanks for brining this to the Oracle EF Core team's attention. I filed an enhancement request (33219678) to have the dev team take a look.

We will prioritize ERs based on customer interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants