You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following Developing MVC web applications tutorial with PostgreSQL instead of SQLite adapter. The column year in table movies should not have a limit to run PostgreSQL migration without errors:
julia> SearchLight.Migration.last_up()
[ Info:2022-03-1820:22:27 SELECT version FROM schema_migrations ORDER BY version DESC
[ Info:2022-03-1820:22:27 CREATE TABLE movies (id SERIAL PRIMARY KEY , type VARCHAR (10), title VARCHAR (100), directors VARCHAR (100), actors VARCHAR (250), country VARCHAR (100), year BIGINT (4), rating VARCHAR (10), categories VARCHAR (100), description VARCHAR (1000))
[error | LibPQ]: SyntaxError: ERROR: syntax error at or near "("
LINE 1:...VARCHAR (250), country VARCHAR (100), year BIGINT (4), ratin...^
┌ Error:2022-03-1820:22:27 Failed executing migration CreateTableMovies up
└ @ SearchLight.Migration ~/.julia/packages/SearchLight/T30SB/src/Migration.jl:298
ERROR: SyntaxError: ERROR: syntax error at or near "("
LINE 1:...VARCHAR (250), country VARCHAR (100), year BIGINT (4), ratin...^
Stacktrace:
[1] error(logger::Memento.Logger, exc::LibPQ.Errors.PQResultError{LibPQ.Errors.C42, LibPQ.Errors.E42601})
@ Memento ~/.julia/packages/Memento/Qk5GZ/src/loggers.jl:458
[2] handle_result(jl_result::LibPQ.Result{false}; throw_error::Bool)
@ LibPQ ~/.julia/packages/LibPQ/qB2gf/src/results.jl:238
[3] _multi_execute(jl_conn::LibPQ.Connection, query::String; throw_error::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ LibPQ ~/.julia/packages/LibPQ/qB2gf/src/results.jl:299
[4] _multi_execute
@ ~/.julia/packages/LibPQ/qB2gf/src/results.jl:295 [inlined]
[5] #execute#51
@ ~/.julia/packages/LibPQ/qB2gf/src/results.jl:288 [inlined]
[6] execute
@ ~/.julia/packages/LibPQ/qB2gf/src/results.jl:285 [inlined]
[7] query(sql::String, conn::LibPQ.Connection)
@ SearchLightPostgreSQL ~/.julia/packages/SearchLightPostgreSQL/Uxp6O/src/SearchLightPostgreSQL.jl:134
[8] query
@ ~/.julia/packages/SearchLightPostgreSQL/Uxp6O/src/SearchLightPostgreSQL.jl:133 [inlined]
[9] create_table(f::Function, name::Symbol, options::String) (repeats 2 times)
@ SearchLightPostgreSQL ~/.julia/packages/SearchLightPostgreSQL/Uxp6O/src/SearchLightPostgreSQL.jl:311
[10] up()
@ SearchLight.Migration.CreateTableMovies ~/JuliaProjects/tutorials/genie-watch-tonight-PostgreSQL/Watchtonight/db/migrations/2022031819191178_create_table_movies.jl:6
[11] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[12] invokelatest
@ ./essentials.jl:714 [inlined]
[13] run_migration(migration::SearchLight.Migration.DatabaseMigration, direction::Symbol; force::Bool)
@ SearchLight.Migration ~/.julia/packages/SearchLight/T30SB/src/Migration.jl:292
[14] #last_up#11
@ ~/.julia/packages/SearchLight/T30SB/src/Migration.jl:153 [inlined]
[15] last_up()
@ SearchLight.Migration ~/.julia/packages/SearchLight/T30SB/src/Migration.jl:153
[16] top-level scope
@ REPL[12]:1
After column(:year, :integer, limit = 4) is changed to column(:year, :integer)
julia> SearchLight.Migration.last_up()
[ Info:2022-03-1820:23:54 SELECT version FROM schema_migrations ORDER BY version DESC
WARNING: replacing module CreateTableMovies.
[ Info:2022-03-1820:23:54 CREATE TABLE movies (id SERIAL PRIMARY KEY , type VARCHAR (10), title VARCHAR (100), directors VARCHAR (100), actors VARCHAR (250), country VARCHAR (100), year BIGINT , rating VARCHAR (10), categories VARCHAR (100), description VARCHAR (1000))
[ Info:2022-03-1820:23:54 CREATE INDEX movies__idx_title ON movies (title)
[ Info:2022-03-1820:23:54 CREATE INDEX movies__idx_actors ON movies (actors)
[ Info:2022-03-1820:23:54 CREATE INDEX movies__idx_categories ON movies (categories)
[ Info:2022-03-1820:23:54 CREATE INDEX movies__idx_description ON movies (description)
[ Info:2022-03-1820:23:54 INSERT INTO schema_migrations VALUES ('2022031819191178')
[ Info:2022-03-1820:23:54 Executed migration CreateTableMovies up
The text was updated successfully, but these errors were encountered:
Following Developing MVC web applications tutorial with PostgreSQL instead of SQLite adapter. The column year in table movies should not have a limit to run PostgreSQL migration without errors:
After
column(:year, :integer, limit = 4)
is changed tocolumn(:year, :integer)
The text was updated successfully, but these errors were encountered: