Logo
Explore Help
Sign In
phundrak/georm
1
0
Fork 0
You've already forked georm
mirror of https://github.com/Phundrak/georm.git synced 2025-06-25 09:24:57 +00:00
Code Issues Packages Releases Wiki Activity
georm/migrations/20250609181248_composite-key.up.sql

8 lines
207 B
MySQL
Raw Normal View History

feat: implement preliminary composite primary key support Add support for entities with composite primary keys using multiple #[georm(id)] fields. Automatically generates {EntityName}Id structs for type-safe composite key handling. Features: - Multi-field primary key detection and ID struct generation - Full CRUD operations (find, create, update, delete, create_or_update) - Proper SQL generation with AND clauses for composite keys - Updated documNtation in README and lib.rs Note: Relationships not yet supported for composite key entities
2025-06-07 16:16:46 +02:00
-- Add up migration script here
CREATE TABLE UserRoles (
user_id INTEGER NOT NULL,
role_id INTEGER NOT NULL,
assigned_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (user_id, role_id)
);
Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 41ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API