Comments (3)
Fix method:
sea-schema/src/sqlite/discovery.rs:23:
pub async fn discover(&self, ignore_tables: Vec<String>) -> DiscoveryResult<Schema> {
let get_tables = SelectStatement::new()
.column(Alias::new("name"))
.from(SqliteMaster)
.and_where(Expr::col(Alias::new("type")).eq("table"))
.and_where(Expr::col(Alias::new("name")).ne("sqlite_sequence"))
.and_where(Expr::col(Alias::new("name")).is_not_in(ignore_tables))
.to_owned();
sea-orm-cli/src/commands/generate.rs:78
let ignore_tables_clone = ignore_tables.clone();
let filter_skip_tables = |table: &String| -> bool { !ignore_tables_clone.contains(table) };
sea-orm-cli/src/commands/generate.rs:139
let schema = schema_discovery.discover(ignore_tables).await?;
from sea-orm.
Thank you for your report. Seems like you have a proposed fix. Can you open a PR?
from sea-orm.
My fixes are superficial and not fully tested, and in the case of non-sqlite database branches there is no compatibility processing. The current code logic changes will significantly lower the current code quality. I hope that some sea-orm members can understand the problem more quickly and know a dirty hack fix based on the information I provided above. Then make a good design and submit clean fix code and test files to solve this problem,(which means a lot of work and takes a lot of time and I can't do it at present), so I hope there are more kind people like you to do this PR
from sea-orm.
Related Issues (20)
- DataLoader load_many and load_many_to_many can't handle capital letters in column name
- Using DeriveIden for enum HOT 3
- Less verbose migration HOT 3
- `referential_key_table_name` empty for multi-column index (Option::unwrap on None during migration)
- `enum`s are always lowercased in queries despire `enum_name` leading to `type does not exist` HOT 2
- DateTimeUtc is recognized as TimestampWithTimeZone HOT 1
- (maybe bug) PaginatorTrait does not apply to generic method. HOT 1
- can sea-orm-cli generate model support model field name camel case option?
- Shared lock syntax incompatible with MariaDB
- SeaORM issue with UUID stored as binary(16) in MySQL
- [BUG] `DerivePartialModel` attr `entity` not support `syn::Path` token HOT 3
- Field name 'is_2fa' converted to 'is2fa' during insertion in SeaORM HOT 3
- Missing primary_key attributes when generating from a DB with partitions HOT 2
- doc: code blocks looks weird in light mode HOT 7
- Incorrect Route Matching Behavior in Actix Example Code HOT 1
- no column found for name: A_
- Missing okapi support HOT 1
- Insert to mysql, can find data inserted in mysql but the method returns with Err(RecordNotFound("Failed to find inserted item")).
- Issues with tables that do not have primary/unique keys
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sea-orm.