-
-
Save z64/872ebab2293838cb627367a7a24bd236 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StarSystem < Jennifer::Model::Base | |
mapping( | |
id: {type: Int64, primary: true}, | |
created_at: {type: Time, null: false, default: Time.now}, | |
updated_at: {type: Time, null: false, default: Time.now}, | |
name: {type: String, null: false}, | |
position: {type: Array(Float64), null: false}, | |
security: {type: String, null: false}, | |
economy: {type: String, null: false}, | |
population: {type: Int64, null: true, default: 0i64}, | |
cc_value: {type: Int32, null: true, default: 0} | |
) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Table "public.star_systems" | |
Column | Type | Modifiers | Storage | Stats target | Description | |
------------+--------------------------+-----------------------------------------------------------+----------+--------------+------------- | |
id | bigint | not null default nextval('star_systems_id_seq'::regclass) | plain | | | |
created_at | timestamp with time zone | not null default now() | plain | | | |
updated_at | timestamp with time zone | not null default now() | plain | | | |
name | text | not null | extended | | | |
position | numeric[] | not null | extended | | | |
security | security | not null | plain | | | |
economy | economy | not null | plain | | | |
population | bigint | not null default 0 | plain | | | |
cc_value | numeric | not null default 0 | main | | | |
Indexes: | |
"star_systems_pkey" PRIMARY KEY, btree (id) | |
"star_system_position_idx" UNIQUE, btree ("position") | |
"star_system_name_idx" btree (name) | |
Referenced by: | |
TABLE "faction_presences" CONSTRAINT "faction_presences_star_system_id_fkey" FOREIGN KEY (star_system_id) REFERENCES star_systems(id) ON DELETE CASCADE | |
TABLE "factions" CONSTRAINT "factions_home_system_id_fkey" FOREIGN KEY (home_system_id) REFERENCES star_systems(id) ON DELETE CASCADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment