mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
parent
c5d667c711
commit
48135ba72c
6 changed files with 27 additions and 9 deletions
|
@ -0,0 +1,5 @@
|
|||
class ChangePricePriceCentsTypeToInteger < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :prices, :price_cents, 'integer USING CAST(price_cents AS integer)'
|
||||
end
|
||||
end
|
5
db/migrate/20170423214500_remove_price_price_currency.rb
Normal file
5
db/migrate/20170423214500_remove_price_price_currency.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class RemovePricePriceCurrency < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :prices, :price_currency, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class RemovePricePriceCentsDefault < ActiveRecord::Migration
|
||||
def change
|
||||
change_column_default :prices, :price_cents, nil
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170423151046) do
|
||||
ActiveRecord::Schema.define(version: 20170423222302) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -964,14 +964,13 @@ ActiveRecord::Schema.define(version: 20170423151046) do
|
|||
create_table "prices", force: :cascade do |t|
|
||||
t.string "desc"
|
||||
t.string "category"
|
||||
t.decimal "price_cents", precision: 10, scale: 2, default: 0.0, null: false
|
||||
t.string "price_currency", default: "EUR", null: false
|
||||
t.integer "price_cents", null: false
|
||||
t.datetime "valid_from"
|
||||
t.datetime "valid_to"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "duration"
|
||||
t.string "operation_category"
|
||||
end
|
||||
|
|
|
@ -2497,8 +2497,7 @@ CREATE TABLE prices (
|
|||
id integer NOT NULL,
|
||||
"desc" character varying,
|
||||
category character varying,
|
||||
price_cents numeric(10,2) DEFAULT 0.0 NOT NULL,
|
||||
price_currency character varying DEFAULT 'EUR'::character varying NOT NULL,
|
||||
price_cents integer NOT NULL,
|
||||
valid_from timestamp without time zone,
|
||||
valid_to timestamp without time zone,
|
||||
creator_str character varying,
|
||||
|
@ -5175,3 +5174,9 @@ INSERT INTO schema_migrations (version) VALUES ('20170423145057');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170423151046');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170423210622');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170423214500');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170423222302');
|
||||
|
||||
|
|
|
@ -2006,8 +2006,7 @@
|
|||
<text text-anchor="start" x="3606.5" y="-668.8" font-family="Times,serif" font-size="14.00">id :integer</text>
|
||||
<text text-anchor="start" x="3606.5" y="-653.8" font-family="Times,serif" font-size="14.00">desc :string</text>
|
||||
<text text-anchor="start" x="3606.5" y="-638.8" font-family="Times,serif" font-size="14.00">category :string</text>
|
||||
<text text-anchor="start" x="3606.5" y="-623.8" font-family="Times,serif" font-size="14.00">price_cents :decimal</text>
|
||||
<text text-anchor="start" x="3606.5" y="-608.8" font-family="Times,serif" font-size="14.00">price_currency :string</text>
|
||||
<text text-anchor="start" x="3606.5" y="-623.8" font-family="Times,serif" font-size="14.00">price_cents :integer</text>
|
||||
<text text-anchor="start" x="3606.5" y="-593.8" font-family="Times,serif" font-size="14.00">valid_from :datetime</text>
|
||||
<text text-anchor="start" x="3606.5" y="-578.8" font-family="Times,serif" font-size="14.00">valid_to :datetime</text>
|
||||
<text text-anchor="start" x="3606.5" y="-563.8" font-family="Times,serif" font-size="14.00">creator_str :string</text>
|
||||
|
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
Loading…
Add table
Add a link
Reference in a new issue