class Marten::DB::Management::Migrations::Record
- Marten::DB::Management::Migrations::Record
- Marten::DB::Model
- Reference
- Object
Overview
A migration record model.
This model class is used internally by Marten in order to keep track of the migrations that were executed for a given project.
Defined in:
marten/db/management/migrations/record.crConstant Summary
- 
        FIELDS_ = {"id" => {type: "big_int", kwargs: {primary_key: true, auto: true}}, "app" => {type: "string", kwargs: {max_size: 255}}, "name" => {type: "string", kwargs: {max_size: NAME_MAX_SIZE}}, "applied_at" => {type: "date_time", kwargs: {auto_now_add: true}}} of Nil => Nil
- 
        A migration record model. This model class is used internally by Marten in order to keep track of the migrations that were executed for a given project. 
- 
        NAME_MAX_SIZE = 255
Instance Method Summary
- #app : String | Nil | Nil
- #app!
- #app=(app : String | Nil | Nil)
- #applied_at : Time | Nil | Nil
- #applied_at!
- #applied_at=(applied_at : Time | Nil | Nil)
- #id : Int32 | Int64 | Nil | Nil
- #id!
- #id=(id : Int32 | Int64 | Nil | Nil)
- #name : String | Nil | Nil
- #name!
- #name=(name : String | Nil | Nil)
- 
        #pk
        
          A migration record model. 
- 
        #pk!
        
          A migration record model. 
- 
        #pk=(val)
        
          A migration record model. 
Constructor methods inherited from class Marten::DB::Model
  
  
    
      new(kwargs : Hash | NamedTuple)new(**kwargs)
new(kwargs : Hash | NamedTuple, &)
new(**kwargs, &) new
Instance methods inherited from module Marten::Core::Validation
  
  
    
      errors : ErrorSet
    errors, 
    
  
    
      invalid?(context : Nil | String | Symbol = nil)
    invalid?, 
    
  
    
      valid?(context : Nil | String | Symbol = nil)
    valid?, 
    
  
    
      validate
    validate
    
  
    
    
  
    
    
    
  
    
    
    
  
    
  Instance methods inherited from module Marten::DB::Model::Persistence
  
  
    
      delete(using : Nil | String | Symbol = nil)
    delete, 
    
  
    
      deleted?
    deleted?, 
    
  
    
      new_record?
    new_record?, 
    
  
    
      persisted?
    persisted?, 
    
  
    
      reload
    reload, 
    
  
    
      save(using : Nil | String | Symbol = nil, validate : Bool = true) : Bool
    save, 
    
  
    
      save!(using : Nil | String | Symbol = nil, validate : Bool = true) : Bool
    save!, 
    
  
    
      update(values : Hash | NamedTuple)update(**values) update, update!(values : Hash | NamedTuple)
update!(**values) update!
Instance methods inherited from module Marten::DB::Model::Comparison
  
  
    
      <=>(other : self)
    <=>, 
    
  
    
      ==(other : self)
    ==
    
  
    
    
  
    
  Instance methods inherited from module Marten::DB::Model::Table
  
  
    
      get_field_value(field_name : String | Symbol)
    get_field_value, 
    
  
    
      inspect(io)
    inspect, 
    
  
    
      set_field_value(field_name : String | Symbol, value : Field::Any | Model)
    set_field_value, 
    
  
    
      set_field_values(values : Hash | NamedTuple)set_field_values(**values) set_field_values, to_s(io) to_s
Instance methods inherited from module Marten::DB::Model::Connection
  
  
    
      transaction(using : Nil | String | Symbol = nil, &block)
    transaction
    
  
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
Instance Method Detail
A migration record model.
This model class is used internally by Marten in order to keep track of the migrations that were executed for a given project.
A migration record model.
This model class is used internally by Marten in order to keep track of the migrations that were executed for a given project.
A migration record model.
This model class is used internally by Marten in order to keep track of the migrations that were executed for a given project.