Comments (4)
Hmm ok, well I'm not using vitesse so I can't reproduce this, but you can anyway just adjust the generated migrations to make the index name shorter.
from mobility.
The problem isn't the length of the index name, it's the key length of the index.
[:translatable_type, :key, :value, :locale] exceeds 3072 bytes apparently.
from mobility.
This is how I made it work
create_table :mobility_string_translations do |t|
t.string :locale, null: false, limit: 10
t.string :key, null: false, limit: 35
t.string :value
t.references :translatable, polymorphic: true, index: false
t.timestamps null: false
t.index [:translatable_id, :translatable_type, :locale, :key], unique: true, name: :i_translations_on_id_l_t_k
t.index [:translatable_id, :translatable_type, :key], name: :i_translations_on_id_type_key
t.index [:translatable_type, :key, :value, :locale], name: :i_translations_on_k_v_l
end
from mobility.
Yeah exactly, just give them a name like @h4b00 showed above.
from mobility.
Related Issues (20)
- Automatic ActionText `rich_text` detection failing when operating on locale-dependent mobility field HOT 1
- Any accepted way to store images working with active storage ? HOT 1
- Unique Validation didn't work with locale_accessors on every locales HOT 1
- Not compatible with FastGettext - request for string available locale support HOT 2
- The presence plugin doesn't work as expected HOT 1
- Destruction of record+translations fails, when model IDs are of the type "varchar(36)" (a UUID string) HOT 3
- accessor super method doesn't work with arguments like class.value(locale: :de) HOT 1
- ordering by specific locale HOT 2
- Add type checking plugin reference HOT 3
- eager_load and pluck builds the wrong query HOT 1
- `i18n` scope incompatible with `exists?` HOT 1
- validates presence: true failing with cache active HOT 3
- Empty content row is created in translation table. HOT 1
- No fixtures are generated / No doc on how to make them ourselves HOT 1
- Not working properly with Rails 7.1.1 HOT 1
- Cannot inject the query when using query method block HOT 2
- Allow composite foreign keys HOT 3
- Mobility with active_storage for translatable attachements HOT 1
- 1.3.0.rc1 Can't assign an translated attribute with a column fallback HOT 1
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 mobility.