7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
# File 'lib/ordlite/schema.rb', line 7
def up
ActiveRecord::Schema.define do
=begin
CREATE TABLE inscribes(
id varchar NOT NULL PRIMARY KEY,
num integer NOT NULL,
content_length integer NOT NULL,
content_type varchar NOT NULL,
date datetime(6) NOT NULL,
sat integer NOT NULL,
height integer NOT NULL,
fee integer NOT NULL,
tx varchar NOT NULL,
offset integer NOT NULL,
address varchar NOT NULL,
created_at datetime(6) NOT NULL,
updated_at datetime(6) NOT NULL)
CREATE TABLE blobs(
id varchar NOT NULL PRIMARY KEY,
content blob NOT NULL
created_at datetime(6) NOT NULL,
updated_at datetime(6) NOT NULL)
=end
create_table :inscribes, :id => :string do |t|
t.integer :num, null: false, index: { unique: true, name: 'inscribe_nums' }
t.integer :bytes, null: false
t.string :content_type, null: false
t.datetime :date, null: false
t.integer :sat, null: false
t.integer :block, null: false
t.integer :fee, null: false
t.string :tx, null: false
t.integer :offset, null: false
t.string :address, null: false
t.string :output, null: false
t.integer :value, null: false
t.timestamps
end
create_table :blobs, :id => :string do |t|
t.binary :content, null: false
t.string :sha256 t.string :md5
t.timestamps
end
=begin
"name": "Planetary Ordinals",
"inscription_icon": "98da33abe2045ec1421fcf1bc376dea5beb17ded15aa70ca5da490f50d95a6d9i0",
"supply": "69",
"slug": "planetary-ordinals",
"description": "",
"twitter_link": "https://twitter.com/ordinalswallet",
"discord_link": "https://discord.com/invite/ordinalswallet",
"website_link": ""
=end
create_table :collections do |t|
t.string :name, null: false
t.string :slug
t.text :desc t.integer :max t.string :icon_id
t.timestamps
end
create_table :items do |t|
t.integer :collection_id, null: false
t.string :inscribe_id, null: false
t.integer :pos, null: false
t.string :name
t.timestamps
end
create_table :factories, :id => :string do |t|
t.string :name
t.integer :max t.integer :maxblock t.string :dim
t.string :inscribe_id, null: false
t.timestamps
end
create_table :inscriberefs, :id => false do |t|
t.string :factory_id, null: false
t.string :inscribe_id, null: false
t.integer :pos, null: false
t.timestamps
end
create_table :generatives, :id => :string do |t|
t.string :factory_id, null: false
t.string :g, null: false t.binary :content
t.timestamps
end
end
end
|